当前位置: 首页>>代码示例>>Java>>正文


Java IWorkbenchActionConstants.M_WINDOW属性代码示例

本文整理汇总了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);
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:22,代码来源:YamcsStudioActionBarAdvisor.java

示例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;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:28,代码来源:ApplicationActionBarAdvisor.java

示例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;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:22,代码来源:ApplicationActionBarAdvisor.java

示例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 () ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:37,代码来源:ApplicationActionBarAdvisor.java

示例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;
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:14,代码来源:TriquetrumEditorAdvisor.java

示例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;
}
 
开发者ID:mondo-project,项目名称:mondo-demo-wt,代码行数:15,代码来源:WTSpec4MEditorAdvisor.java

示例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;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:36,代码来源:EnsembleActionBarAdvisor.java

示例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;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:16,代码来源:DictionaryEditorAdvisor.java

示例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;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:13,代码来源:DesignerActionBarAdvisor.java

示例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 );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:43,代码来源:ApplicationActionBarAdvisor.java


注:本文中的org.eclipse.ui.IWorkbenchActionConstants.M_WINDOW属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。