Java Code Examples for org.eclipse.ui.IWorkbenchActionConstants#M_HELP

The following examples show how to use org.eclipse.ui.IWorkbenchActionConstants#M_HELP . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GamaActionBarAdvisor.java    From gama with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Creates and returns the Help menu.
 */
private MenuManager createHelpMenu() {
	final MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_help, IWorkbenchActionConstants.M_HELP);
	addSeparatorOrGroupMarker(menu, "group.intro"); //$NON-NLS-1$
	menu.add(new GroupMarker("group.intro.ext")); //$NON-NLS-1$
	addSeparatorOrGroupMarker(menu, "group.main"); //$NON-NLS-1$
	menu.add(helpContentsAction);
	addSeparatorOrGroupMarker(menu, "group.assist"); //$NON-NLS-1$
	menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
	menu.add(new GroupMarker("group.main.ext")); //$NON-NLS-1$
	addSeparatorOrGroupMarker(menu, "group.tutorials"); //$NON-NLS-1$
	addSeparatorOrGroupMarker(menu, "group.tools"); //$NON-NLS-1$
	addSeparatorOrGroupMarker(menu, "group.updates"); //$NON-NLS-1$
	menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
	addSeparatorOrGroupMarker(menu, IWorkbenchActionConstants.MB_ADDITIONS);
	// about should always be at the bottom
	menu.add(new Separator("group.about")); //$NON-NLS-1$

	final ActionContributionItem aboutItem = new ActionContributionItem(aboutAction);
	aboutItem.setVisible(!Util.isMac());
	menu.add(aboutItem);
	menu.add(new GroupMarker("group.about.ext")); //$NON-NLS-1$
	menu.add(openPreferencesAction);
	return menu;
}
 
Example 2
Source File: ApplicationActionBarAdvisor.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 创建帮助菜单
 * @return 返回帮助菜单的 menu manager;
 */
private MenuManager createHelpMenu() {
	MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.help"),
			IWorkbenchActionConstants.M_HELP);
	// menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
	menu.add(helpAction);
	// menu.add(helpSearchAction);
	// menu.add(dynamicHelpAction);
	// menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
	menu.add(new GroupMarker("help.keyAssist"));
	menu.add(new Separator());
	menu.add(new GroupMarker("help.updatePlugin"));
	menu.add(new Separator());
	menu.add(new GroupMarker("help.license"));
	// 关于菜单需要始终显示在最底端
	menu.add(new GroupMarker("group.about"));
	// ActionContributionItem aboutItem = new ActionContributionItem(aboutAction);
	// aboutItem.setVisible(!Util.isMac());
	// menu.add(aboutItem);
	return menu;
}
 
Example 3
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 创建帮助菜单
 * @return 返回帮助菜单的 menu manager;
 */
private MenuManager createHelpMenu() {
	MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.help"),
			IWorkbenchActionConstants.M_HELP);
	// menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
	menu.add(helpAction);
	// menu.add(helpSearchAction);
	// menu.add(dynamicHelpAction);
	// menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
	menu.add(new GroupMarker("help.keyAssist"));
	menu.add(new Separator());
	menu.add(new GroupMarker("help.updatePlugin"));
	menu.add(new Separator());
	menu.add(new GroupMarker("help.license"));
	// 关于菜单需要始终显示在最底端
	menu.add(new GroupMarker("group.about"));
	// ActionContributionItem aboutItem = new ActionContributionItem(aboutAction);
	// aboutItem.setVisible(!Util.isMac());
	// menu.add(aboutItem);
	return menu;
}
 
Example 4
Source File: DesignerActionBarAdvisor.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
/**
	 * Creates and returns the Help menu.
	 */
	private MenuManager createHelpMenu( )
	{
		MenuManager menu = new MenuManager( DesignerWorkbenchMessages.Workbench_help,
				IWorkbenchActionConstants.M_HELP );

		// See if a welcome or introduction page is specified
		if ( introAction != null )
			menu.add( introAction );
//		else if ( quickStartAction != null )
//			menu.add( quickStartAction );
		menu.add( helpContentsAction );

//		if ( tipsAndTricksAction != null )
//			menu.add( tipsAndTricksAction );

		menu.add( new GroupMarker( "group.tutorials" ) ); //$NON-NLS-1$
		menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
		menu.add( new Separator( "group.about" ) ); //$NON-NLS-1$
		menu.add( aboutAction );
		menu.add( new GroupMarker( "group.about.ext" ) ); //$NON-NLS-1$

		return menu;
	}
 
Example 5
Source File: ApplicationActionBarAdvisor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
@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 () ) );
}
 
Example 6
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 创建帮助菜单
 * @return 返回帮助菜单的 menu manager;
 */
private MenuManager createHelpMenu() {
	MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.help"),
			IWorkbenchActionConstants.M_HELP);
	menu.add(helpAction);
	menu.add(new GroupMarker("help.keyAssist"));
	menu.add(new Separator());
	menu.add(new GroupMarker("help.updatePlugin"));
	menu.add(new Separator());
	menu.add(new GroupMarker("help.license"));
	// 关于菜单需要始终显示在最底端
	menu.add(new GroupMarker("group.about"));
	return menu;
}
 
Example 7
Source File: RcpActionBarAdvisor.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
private void fillHelpMenu(IMenuManager menuBar) {
	MenuManager helpMenu = new MenuManager(
			M.Help, IWorkbenchActionConstants.M_HELP);
	helpMenu.add(Actions.create(
			M.OnlineHelp, Icon.HELP.descriptor(),
			() -> Desktop.browse(Config.HELP_URL)));
	helpMenu.add(new Separator());
	helpMenu.add(Actions.create(
			M.OpenLogFile, Icon.FILE.descriptor(), LogFileEditor::open));
	helpMenu.add(aboutAction);
	menuBar.add(helpMenu);
}
 
Example 8
Source File: ApplicationActionBarAdvisor.java    From neoscada with Eclipse Public License 1.0 4 votes vote down vote up
@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 );
}
 
Example 9
Source File: ApplicationActionBarAdvisor.java    From elexis-3-core with Eclipse Public License 1.0 4 votes vote down vote up
protected void fillMenuBar(IMenuManager menuBar){
	
	fileMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_3,
			IWorkbenchActionConstants.M_FILE);
	fileMenu.addMenuListener(reflectRightsListener);
	editMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_4,
			IWorkbenchActionConstants.M_EDIT);
	editMenu.addMenuListener(reflectRightsListener);
	windowMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_5,
			IWorkbenchActionConstants.M_WINDOW);
	helpMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_6,
			IWorkbenchActionConstants.M_HELP);
	helpMenu.addMenuListener(reflectRightsListener);
	menuBar.add(fileMenu);
	menuBar.add(editMenu);
	menuBar.add(windowMenu);
	menuBar.add(helpMenu);
	
	fileMenu.add(GlobalActions.loginAction);
	fileMenu.add(GlobalActions.changeMandantAction);
	fileMenu.add(GlobalActions.connectWizardAction);
	fileMenu.add(GlobalActions.prefsAction);
	fileMenu.add(new Separator());
	fileMenu.add(GlobalActions.importAction);
	fileMenu.add(new GroupMarker(IMPORTER_GROUP));
	fileMenu.add(new Separator());
	// fileMenu.add(GlobalActions.updateAction);
	fileMenu.add(new GroupMarker(ADDITIONS));
	fileMenu.add(new Separator());
	fileMenu.add(GlobalActions.exitAction);
	
	editMenu.add(GlobalActions.copyAction);
	editMenu.add(GlobalActions.cutAction);
	editMenu.add(GlobalActions.pasteAction);

	
	GlobalActions.perspectiveMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_7, "openPerspective"); //$NON-NLS-1$
	perspectiveMenu.add(resetPerspectiveAction);
	windowMenu.add(perspectiveMenu);
	
	GlobalActions.viewMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_9);
	GlobalActions.viewList = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
	GlobalActions.viewMenu.add(GlobalActions.viewList);
	windowMenu.add(GlobalActions.viewMenu);
	windowMenu.addMenuListener(new IMenuListener() {
		
		@Override
		public void menuAboutToShow(IMenuManager manager){
			IContributionItem[] items = manager.getItems();
			for (IContributionItem iContributionItem : items) {
				if( "viewsShortlist".equals(iContributionItem.getId())) {
					iContributionItem.setVisible(CoreHub.acl.request(AC_SHOWVIEW));
				}
			}
		}
	});
	
	/* helpMenu.add(testAction); */
	helpMenu.add(GlobalActions.helpAction);
	helpMenu.add(new Separator("additions"));
	helpMenu.add(new Separator());
	helpMenu.add(GlobalActions.aboutAction);
}