本文整理汇总了Java中org.eclipse.ui.IWorkbenchActionConstants.M_WINDOW属性的典型用法代码示例。如果您正苦于以下问题:Java IWorkbenchActionConstants.M_WINDOW属性的具体用法?Java IWorkbenchActionConstants.M_WINDOW怎么用?Java IWorkbenchActionConstants.M_WINDOW使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.ui.IWorkbenchActionConstants
的用法示例。
在下文中一共展示了IWorkbenchActionConstants.M_WINDOW属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillMenuBar
@Override
protected void fillMenuBar(final IMenuManager menubar) {
menubar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
IMenuManager windowMenu = new MenuManager("Window", IWorkbenchActionConstants.M_WINDOW);
menubar.add(windowMenu);
windowMenu.add(resetPerspectiveAction);
windowMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
windowMenu.add(new Separator());
windowMenu.add(preferencesAction);
// plugin.xml in css menu.app defines a non-brandable icon.
// through plugin.xml in this bundle, that help menu is hidden, and
// we replace it here with another one (shorter) version
IMenuManager helpMenu = new MenuManager("Help", "help-2");
menubar.add(helpMenu);
helpMenu.add(onlineHelpAction);
helpMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
helpMenu.add(new Separator());
helpMenu.add(raiseIssueAction);
helpMenu.add(new Separator());
helpMenu.add(aboutAction);
}
示例2: createWindowMenu
/**
* Creates and returns the Window menu.
*/
private MenuManager createWindowMenu() {
MenuManager menu = new MenuManager(
IDEWorkbenchMessages.Workbench_window,
IWorkbenchActionConstants.M_WINDOW);
menu.add(newWindowAction);
menu.add(newEditorAction);
menu.add(new Separator());
addPerspectiveActions(menu);
menu.add(new Separator());
addKeyboardShortcuts(menu);
Separator sep = new Separator(IWorkbenchActionConstants.MB_ADDITIONS);
sep.setVisible(!Util.isMac());
menu.add(sep);
// See the comment for quit in createFileMenu
ActionContributionItem openPreferencesItem = new ActionContributionItem(
openPreferencesAction);
openPreferencesItem.setVisible(!Util.isMac());
menu.add(openPreferencesItem);
menu.add(ContributionItemFactory.OPEN_WINDOWS.create(getWindow()));
return menu;
}
示例3: createWindowMenu
/**
* Creates and returns the Window menu.
*/
private MenuManager createWindowMenu()
{
MenuManager menu =
new MenuManager(IDEWorkbenchMessages.Workbench_window,
IWorkbenchActionConstants.M_WINDOW);
menu.add(newWindowAction);
menu.add(newEditorAction);
menu.add(new Separator());
addPerspectiveActions(menu);
menu.add(new Separator());
Separator sep = new Separator(IWorkbenchActionConstants.MB_ADDITIONS);
sep.setVisible(!Util.isMac());
menu.add(sep);
menu.add(ContributionItemFactory.OPEN_WINDOWS.create(getWindow()));
return menu;
}
示例4: fillMenuBar
@Override
protected void fillMenuBar ( final IMenuManager menuBar )
{
final MenuManager fileMenu = new MenuManager ( "&File", IWorkbenchActionConstants.M_FILE );
final MenuManager windowMenu = new MenuManager ( "&Window", IWorkbenchActionConstants.M_WINDOW );
final MenuManager helpMenu = new MenuManager ( "&Help", IWorkbenchActionConstants.M_HELP );
final MenuManager fileNewMenu = new MenuManager ( "&New", IWorkbenchActionConstants.NEW_EXT );
final MenuManager windowNewMenu = new MenuManager ( "Show &View", IWorkbenchActionConstants.SHOW_EXT );
menuBar.add ( fileMenu );
// Add a group marker indicating where action set menus will appear.
menuBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
menuBar.add ( windowMenu );
menuBar.add ( helpMenu );
// File
fileMenu.add ( this.newWindowAction );
fileMenu.add ( new Separator () );
fileMenu.add ( fileNewMenu );
fileMenu.add ( getAction ( ActionFactory.SAVE.getId () ) );
fileMenu.add ( getAction ( ActionFactory.NEW_EDITOR.getId () ) );
fileMenu.add ( new GroupMarker ( IWorkbenchActionConstants.OPEN_EXT ) );
fileMenu.add ( new Separator () );
fileMenu.add ( this.exitAction );
fileNewMenu.add ( this.newWizards );
// Window
windowNewMenu.add ( this.showViews );
windowMenu.add ( windowNewMenu );
windowMenu.add ( getAction ( ActionFactory.PREFERENCES.getId () ) );
// Help
helpMenu.add ( this.aboutAction );
helpMenu.add ( getAction ( ActionFactory.INTRO.getId () ) );
}
示例5: createWindowMenu
/**
* Creates the 'Window' menu. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
protected IMenuManager createWindowMenu(IWorkbenchWindow window) {
IMenuManager menu = new MenuManager(getString("_UI_Menu_Window_label"), IWorkbenchActionConstants.M_WINDOW);
addToMenuAndRegister(menu, ActionFactory.OPEN_NEW_WINDOW.create(window));
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(ContributionItemFactory.OPEN_WINDOWS.create(window));
return menu;
}
示例6: createWindowMenu
/**
* Creates the 'Window' menu.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IMenuManager createWindowMenu(IWorkbenchWindow window) {
IMenuManager menu = new MenuManager(getString("_UI_Menu_Window_label"),
IWorkbenchActionConstants.M_WINDOW);
addToMenuAndRegister(menu, ActionFactory.OPEN_NEW_WINDOW.create(window));
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
return menu;
}
示例7: createWindowMenu
/**
* Create the "Window" menu.
* file/new
* @return
*/
protected IMenuManager createWindowMenu() {
IWorkbenchWindow window = getWindow();
MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_window, IWorkbenchActionConstants.M_WINDOW);
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS+"2"));
menu.add(new Separator());
MenuManager perspectiveMenu = new MenuManager("Open Perspective", "openPerspective");
IContributionItem perspectiveList = ContributionItemFactory.PERSPECTIVES_SHORTLIST.create(window);
perspectiveMenu.add(perspectiveList);
menu.add(perspectiveMenu);
MenuManager viewMenu = new MenuManager("Show View", "showView");
IContributionItem viewList = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
viewMenu.add(viewList);
menu.add(viewMenu);
menu.add(ActionFactory.RESET_PERSPECTIVE.create(window));
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
IWorkbenchAction newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
newWindowAction.setText("New Window");
menu.add(newWindowAction);
IWorkbenchAction preferences = ActionFactory.PREFERENCES.create(window);
String oldText = preferences.getText();
if (!oldText.contains("...")) {
preferences.setText(oldText+"...");
}
ActionContributionItem preferenceItem = new ActionContributionItem(preferences);
menu.add(preferenceItem);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
preferenceItem.setVisible(false);
}
menu.add(ContributionItemFactory.OPEN_WINDOWS.create(window));
return menu;
}
示例8: createWindowMenu
/**
* Creates the 'Window' menu.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IMenuManager createWindowMenu(IWorkbenchWindow window) {
IMenuManager menu = new MenuManager(getString("_UI_Menu_Window_label"),
IWorkbenchActionConstants.M_WINDOW);
addToMenuAndRegister(menu, ActionFactory.OPEN_NEW_WINDOW.create(window));
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(ContributionItemFactory.OPEN_WINDOWS.create(window));
return menu;
}
示例9: createWindowMenu
/**
* Creates and returns the Window menu.
*/
private MenuManager createWindowMenu( )
{
MenuManager menu = new MenuManager( DesignerWorkbenchMessages.Workbench_window,
IWorkbenchActionConstants.M_WINDOW );
addPerspectiveActions( menu );
menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
menu.add( openPreferencesAction );
return menu;
}
示例10: fillMenuBar
@Override
protected void fillMenuBar ( final IMenuManager menuBar )
{
final MenuManager fileMenu = new MenuManager ( "&File", IWorkbenchActionConstants.M_FILE );
final MenuManager windowMenu = new MenuManager ( "&Window", IWorkbenchActionConstants.M_WINDOW );
final MenuManager helpMenu = new MenuManager ( "&Help", IWorkbenchActionConstants.M_HELP );
final MenuManager fileNewMenu = new MenuManager ( "&New", IWorkbenchActionConstants.NEW_EXT );
final MenuManager windowNewMenu = new MenuManager ( "Show &View", IWorkbenchActionConstants.SHOW_EXT );
// Main
menuBar.add ( fileMenu );
menuBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
menuBar.add ( windowMenu );
menuBar.add ( helpMenu );
// File
fileMenu.add ( this.newWindowAction );
fileMenu.add ( new Separator () );
fileMenu.add ( fileNewMenu );
fileMenu.add ( getAction ( ActionFactory.SAVE.getId () ) );
fileMenu.add ( getAction ( ActionFactory.NEW_EDITOR.getId () ) );
fileMenu.add ( new GroupMarker ( IWorkbenchActionConstants.OPEN_EXT ) );
fileMenu.add ( new Separator () );
fileMenu.add ( this.exitAction );
fileNewMenu.add ( this.newWizards );
// Window
windowNewMenu.add ( this.showViews );
windowMenu.add ( windowNewMenu );
windowMenu.add ( getAction ( ActionFactory.PREFERENCES.getId () ) );
// Help
helpMenu.add ( getAction ( ActionFactory.INTRO.getId () ) );
helpMenu.add ( this.showHelpAction ); // NEW
helpMenu.add ( this.searchHelpAction ); // NEW
helpMenu.add ( this.dynamicHelpAction ); // NEW
helpMenu.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
helpMenu.add ( new Separator () );
helpMenu.add ( this.aboutAction );
}