1 package com.generalrobotix.ui.grxui;
3 import org.eclipse.jface.action.IContributionItem;
4 import org.eclipse.jface.action.IMenuManager;
5 import org.eclipse.jface.action.MenuManager;
6 import org.eclipse.ui.IWorkbenchActionConstants;
7 import org.eclipse.ui.IWorkbenchWindow;
8 import org.eclipse.ui.actions.ActionFactory;
9 import org.eclipse.ui.actions.ContributionItemFactory;
10 import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
11 import org.eclipse.ui.application.ActionBarAdvisor;
12 import org.eclipse.ui.application.IActionBarConfigurer;
28 exitAction = ActionFactory.QUIT.create(window);
30 showViewItem = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
31 preferencesAction = ActionFactory.PREFERENCES.create(window);
33 resetAction = ActionFactory.RESET_PERSPECTIVE.create(window);
38 MenuManager fileMenu =
new MenuManager(
MessageBundle.
get(
"ApplicationActionBarAdvisor.menu.file"),
39 IWorkbenchActionConstants.M_FILE);
40 menuBar.add(fileMenu);
41 fileMenu.add(exitAction);
42 MenuManager windowMenu =
new MenuManager(
MessageBundle.
get(
"ApplicationActionBarAdvisor.menu.window"),
43 IWorkbenchActionConstants.M_WINDOW);
45 menuBar.add(windowMenu);
46 MenuManager showViewMenu =
new MenuManager(
MessageBundle.
get(
"ApplicationActionBarAdvisor.menu.view"));
47 showViewMenu.add(showViewItem);
48 windowMenu.add(showViewMenu);
49 windowMenu.add(preferencesAction);
50 windowMenu.add(resetAction);
IWorkbenchAction resetAction
static final String get(String key)
void fillMenuBar(IMenuManager menuBar)
IWorkbenchAction exitAction
void makeActions(final IWorkbenchWindow window)
ApplicationActionBarAdvisor(IActionBarConfigurer configurer)
IWorkbenchAction preferencesAction
IContributionItem showViewItem