private MenuManager getSubMenu(MenuData menuData) {

		String[] fullPath = menuData.getMenuPath();
		String displayName = fullPath[level];
		char mnemonic = getMnemonicKey(displayName);
		String realName = stripMnemonicAmp(displayName);
		MenuManager subMenu = subMenus.get(realName);
		if (subMenu != null) {
			return subMenu;
		}

		int subMenuLevel = level + 1;
		String[] subMenuPath = new String[subMenuLevel];
		System.arraycopy(fullPath, 0, subMenuPath, 0, subMenuLevel);

		String subMenuGroup = getSubMenuGroup(menuData, realName, subMenuPath);
		subMenu = new MenuManager(realName, subMenuPath, mnemonic, subMenuLevel, subMenuGroup,
			usePopupPath, menuHandler, menuGroupMap);
		subMenus.put(realName, subMenu);
		managedMenuItems.add(subMenu);

		return subMenu;
	}
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