// If we're on OS X we shouldn't show this command in the File menu. It
// should be invisible to the user. However, we should not remove it -
// the carbon UI code will do a search through our menu structure
// looking for it when Cmd-Q is invoked (or Quit is chosen from the
// application menu.
ActionContributionItem quitItem = new ActionContributionItem(quitAction);
quitItem.setVisible(!Util.isMac());
fileMenu.add(quitItem);
}
MenuManager windowMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_menu_window,
IWorkbenchActionConstants.M_WINDOW);
menuBar.add(windowMenu);
{
MenuManager openViewMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_menu_showView, "showView"); //$NON-NLS-1$
openViewMenu.add(showViewItem);
windowMenu.add(newEditorAction);
windowMenu.add(new Separator());
windowMenu.add(openViewMenu);
windowMenu.add(new Separator());
windowMenu.add(resetPerspectiveAction);
Separator sep = new Separator(IWorkbenchActionConstants.MB_ADDITIONS);
sep.setVisible(!Util.isMac());
windowMenu.add(sep);
// See comment above at quitAction
ActionContributionItem openPreferencesItem = new ActionContributionItem(openPreferencesAction);
openPreferencesItem.setVisible(!Util.isMac());
windowMenu.add(openPreferencesItem);
}
MenuManager helpMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_menu_help,
IWorkbenchActionConstants.M_HELP);