private void updateMenuItem() {
		MenuData menuData = isPopup ? action.getPopupMenuData() : action.getMenuBarData();
		if (menuData != null) {
			String text = menuData.getMenuItemName();
			String trimmed = StringUtilities.trimMiddle(text, 50);
			menuItem.setText(trimmed);
			Icon menuIcon = menuData.getMenuIcon();
			menuItem.setIcon(menuIcon);
			if (menuIcon != null) {
				menuItem.setDisabledIcon(ResourceManager.getDisabledIcon(menuIcon));
			}
			menuItem.setMnemonic(menuData.getMnemonic());
			menuItem.revalidate();
		}
	}
Class to manage a JMenuItem for an action.  Handles property changes in the action
and makes the corresponding change in the menuItem.
Ghidra/Framework/Docking/src/main/java/docking/menu/MenuItemManager.java