Example usage for org.eclipse.jface.action GroupMarker GroupMarker

List of usage examples for org.eclipse.jface.action GroupMarker GroupMarker

Introduction

In this page you can find the example usage for org.eclipse.jface.action GroupMarker GroupMarker.

Prototype

public GroupMarker(String groupName) 

Source Link

Document

Create a new group marker with the given name.

Usage

From source file:net.sourceforge.eclipsetrader.ApplicationActionBarAdvisor.java

License:Open Source License

protected void fillMenuBar(IMenuManager menuBar) {
    MenuManager menu = new MenuManager(Messages.ApplicationActionBarAdvisor_File,
            IWorkbenchActionConstants.M_FILE);
    menu.add(new Separator(IWorkbenchActionConstants.FILE_START));

    MenuManager wizardMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_New, "newWizard"); //$NON-NLS-1$
    wizardMenu.add(new Separator("top")); //$NON-NLS-1$
    wizardMenu.add(new Separator("plugins")); //$NON-NLS-1$
    wizardMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    wizardMenu.add(new Separator("bottom")); //$NON-NLS-1$
    menu.add(wizardMenu);//from   w w w  . j a  va 2 s  . co m
    menu.add(new Separator());
    menu.add(new CloseAction());
    menu.add(new CloseAllAction());
    menu.add(new Separator());
    menu.add(importAction);
    menu.add(exportAction);
    menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    menu.add(new Separator(IWorkbenchActionConstants.FILE_END));
    menu.add(propertiesAction);
    menu.add(new Separator());
    menu.add(quitAction);
    menuBar.add(menu);

    menu = new MenuManager(Messages.ApplicationActionBarAdvisor_Edit, IWorkbenchActionConstants.M_EDIT);
    menu.add(cutAction);
    menu.add(copyAction);
    menu.add(pasteAction);
    menu.add(pasteSpecialAction);
    menu.add(new Separator());
    menu.add(deleteAction);
    menu.add(new Separator());
    menu.add(settingsAction);
    menu.add(preferencesAction);
    menuBar.add(menu);

    menuBar.add(new GroupMarker("begin")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("charts")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("news")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("group1")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("group2")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("group3")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("group4")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("group5")); //$NON-NLS-1$
    menuBar.add(new GroupMarker("group6")); //$NON-NLS-1$
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(new GroupMarker("end")); //$NON-NLS-1$

    menu = new MenuManager(Messages.ApplicationActionBarAdvisor_Window, IWorkbenchActionConstants.M_WINDOW);
    menu.add(new Separator("top")); //$NON-NLS-1$
    menu.add(newWindowAction);
    menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

    menu.add(new Separator());
    MenuManager perspectiveMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_OpenPerspective,
            "openPerspective"); //$NON-NLS-1$
    perspectiveMenu.add(perspectiveList);
    menu.add(perspectiveMenu);
    MenuManager viewMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_ShowView, "showView"); //$NON-NLS-1$
    viewMenu.add(viewList);
    menu.add(viewMenu);

    menu.add(new Separator());
    menu.add(editActionSetsAction);
    menu.add(savePerspectiveAction);
    menu.add(resetPerspectiveAction);
    menu.add(new Separator("bottom")); //$NON-NLS-1$
    menuBar.add(menu);

    menu = new MenuManager(Messages.ApplicationActionBarAdvisor_Help0, IWorkbenchActionConstants.M_HELP);
    // Welcome or intro page would go here
    menu.add(helpContentsAction);
    // Tips and tricks page would go here
    menu.add(new Separator(IWorkbenchActionConstants.HELP_START));
    menu.add(new Separator("group.main.ext")); //$NON-NLS-1$
    menu.add(new Separator("group.tutorials")); //$NON-NLS-1$
    menu.add(new Separator("group.tools")); //$NON-NLS-1$
    menu.add(new Separator("group.updates")); //$NON-NLS-1$
    menu.add(new Separator(IWorkbenchActionConstants.HELP_END));
    menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    // About should always be at the bottom
    // To use the real RCP About dialog uncomment these lines
    menu.add(new Separator("group.about")); //$NON-NLS-1$ 
    menu.add(aboutAction);
    menu.add(new Separator("group.about.ext")); //$NON-NLS-1$ 
    menuBar.add(menu);

    getActionBarConfigurer().registerGlobalAction(cutAction);
    getActionBarConfigurer().registerGlobalAction(copyAction);
    getActionBarConfigurer().registerGlobalAction(pasteAction);
    getActionBarConfigurer().registerGlobalAction(pasteSpecialAction);
    getActionBarConfigurer().registerGlobalAction(deleteAction);
}

From source file:net.sourceforge.taggerplugin.search.TagSearchResultPage.java

License:Open Source License

private static void createContextMenuGroups(IMenuManager menu) {
    menu.add(new Separator(IContextMenuConstants.GROUP_NEW));
    menu.add(new GroupMarker(IContextMenuConstants.GROUP_GOTO));
    menu.add(new GroupMarker(IContextMenuConstants.GROUP_OPEN));
    menu.add(new Separator(IContextMenuConstants.GROUP_SHOW));
    menu.add(new Separator(IContextMenuConstants.GROUP_REMOVE_MATCHES));
    menu.add(new Separator(IContextMenuConstants.GROUP_REORGANIZE));
    menu.add(new GroupMarker(IContextMenuConstants.GROUP_GENERATE));
    menu.add(new Separator(IContextMenuConstants.GROUP_SEARCH));
    menu.add(new Separator(IContextMenuConstants.GROUP_BUILD));
    menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    menu.add(new Separator(IContextMenuConstants.GROUP_VIEWER_SETUP));
    menu.add(new Separator(IContextMenuConstants.GROUP_PROPERTIES));
}

From source file:net.timedoctor.product.workbench.ApplicationActionBarAdvisor.java

License:Open Source License

@Override
protected void fillMenuBar(final IMenuManager menuBar) {
    IWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();

    MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
    MenuManager editMenu = new MenuManager("&Edit", IWorkbenchActionConstants.M_EDIT);
    MenuManager windowMenu = new MenuManager("&Window", IWorkbenchActionConstants.M_WINDOW);
    MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);

    menuBar.add(fileMenu);/*w w  w. ja  v  a 2s.c om*/
    menuBar.add(editMenu);
    // 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(openAction);
    fileMenu.add(closeAction);
    IContributionItem recentFileList = ContributionItemFactory.REOPEN_EDITORS.create(window);
    fileMenu.add(recentFileList);
    fileMenu.add(new Separator());
    fileMenu.add(exitAction);

    //Edit
    editMenu.add(copyAction);

    // Window
    MenuManager viewMenu = new MenuManager("Show View");
    IContributionItem showViewList = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
    viewMenu.add(showViewList);
    windowMenu.add(viewMenu);
    windowMenu.add(new Separator());
    windowMenu.add(preferenceAction);

    // Help
    helpMenu.add(helpAction);
    helpMenu.add(new Separator());
    helpMenu.add(aboutAction);
}

From source file:net.tourbook.application.ApplicationActionBarAdvisor.java

License:Open Source License

private MenuManager createMenu_10_New() {

    final MenuManager newMenu = new MenuManager(Messages.App_Action_Menu_New, "m_New"); //$NON-NLS-1$

    newMenu.add(new GroupMarker("ci_New")); //$NON-NLS-1$
    newMenu.add(_quitItem);/*w  w w .j  ava  2 s. co  m*/

    return newMenu;
}

From source file:net.tourbook.application.ApplicationActionBarAdvisor.java

License:Open Source License

private MenuManager createMenu_40_Tool() {

    final MenuManager toolMenu = new MenuManager(Messages.App_Action_Menu_tools, "m_Tools"); //$NON-NLS-1$

    toolMenu.add(new GroupMarker("tools")); //$NON-NLS-1$
    toolMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));

    toolMenu.add(new Separator());
    toolMenu.add(_actionOtherViews);//ww  w  .  j  a va  2s  . c o  m
    addPerspectiveActions(toolMenu);

    toolMenu.add(new Separator());
    toolMenu.add(_prefItem);

    return toolMenu;
}

From source file:net.tourbook.application.ApplicationActionBarAdvisor.java

License:Open Source License

@Override
protected void fillMenuBar(final IMenuManager menuBar) {

    /*// w  ww  .j a v a  2  s.c  o m
     * Create app menu
     */
    menuBar.add(createMenu_10_New());
    menuBar.add(createMenu_20_Directories());
    menuBar.add(createMenu_30_Tour());
    menuBar.add(createMenu_40_Tool());
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(createMenu_50_Help());
}

From source file:net.tourbook.ui.views.rawData.RawDataView.java

License:Open Source License

private void fillToolbar() {

    /*//from   ww  w. j a v a2s .co  m
     * fill view toolbar
     */
    final IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();

    tbm.add(_actionSaveTourWithPerson);
    tbm.add(_actionSaveTour);
    tbm.add(new Separator());

    // place for import and transfer actions
    tbm.add(new GroupMarker("import")); //$NON-NLS-1$
    tbm.add(new Separator());

    tbm.add(_actionClearView);
    tbm.add(_actionOpenTourLogView);
    tbm.add(_actionSetupImport);

    /*
     * fill view menu
     */
    final IMenuManager menuMgr = getViewSite().getActionBars().getMenuManager();

    menuMgr.add(_actionRemoveToursWhenClosed);
    menuMgr.add(_actionEditImportPreferences);

    menuMgr.add(new Separator());
    menuMgr.add(_actionModifyColumns);
}

From source file:net.yatomiya.e4.ui.workbench.renderers.swt.MenuManagerRenderer.java

License:Open Source License

/**
 * @param menuManager/*  www . j a  v  a  2 s. c o m*/
 * @param itemModel
 */
private void processSeparator(MenuManager menuManager, MMenuSeparator itemModel) {
    IContributionItem ici = getContribution(itemModel);
    if (ici != null) {
        return;
    }
    itemModel.setRenderer(this);
    AbstractGroupMarker marker = null;
    if (itemModel.getTags().contains(GROUP_MARKER) || !itemModel.isVisible()) {
        if (itemModel.getElementId() != null) {
            marker = new GroupMarker(itemModel.getElementId());
        }
    } else {
        marker = new Separator();
        marker.setId(itemModel.getElementId());
    }
    if (marker == null) {
        return;
    }
    addToManager(menuManager, itemModel, marker);
    linkModelToContribution(itemModel, marker);
}

From source file:net.yatomiya.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.java

License:Open Source License

private void processSeparator(ToolBarManager parentManager, MToolBarSeparator itemModel) {
    IContributionItem ici = getContribution(itemModel);
    if (ici != null) {
        return;/*w w w.j  av a  2 s .  co  m*/
    }
    itemModel.setRenderer(this);
    AbstractGroupMarker marker = null;
    if (itemModel.isVisible() && !itemModel.getTags().contains(MenuManagerRenderer.GROUP_MARKER)) {
        marker = new Separator();
        marker.setId(itemModel.getElementId());
    } else {
        if (itemModel.getElementId() != null) {
            marker = new GroupMarker(itemModel.getElementId());
        }
    }
    if (marker != null) {
        addToManager(parentManager, itemModel, marker);
        linkModelToContribution(itemModel, marker);
    }
}

From source file:networkadministrator.ApplicationActionBarAdvisor.java

License:Open Source License

protected void fillMenuBar(IMenuManager menuBar) {
    MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
    MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);

    menuBar.add(fileMenu);//  w  w  w .j  a  v  a 2  s .  c  om
    // Add a group marker indicating where action set menus will appear.
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(helpMenu);

    // File
    fileMenu.add(messagePopupAction);
    fileMenu.add(openViewAction);
    fileMenu.add(new Separator());
    fileMenu.add(exitAction);

    // Help
    helpMenu.add(aboutAction);
}