private String getSubMenuGroup(MenuData menuData, String menuName, String[] subMenuPath) {

		// prefer the group defined in the menu data, if any
		String pullRightGroup = getPullRightMenuGroup(menuData);
		if (pullRightGroup != null) {
			return pullRightGroup;
		}

		// check the global registry
		pullRightGroup = menuGroupMap.getMenuGroup(subMenuPath);
		if (pullRightGroup != null) {
			return pullRightGroup;
		}

		// default to the menu name
		return menuName;
	}
Adds an action to this menu. Can create subMenus depending on the menuPath of the action
@param action the action to be added
Ghidra/Framework/Docking/src/main/java/docking/menu/MenuManager.java