當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。