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:custom.swt.widgets.PopupDialog.java

License:Open Source License

/**
 * Fill the dialog's menu. Subclasses may extend or override.
 * /*from   w ww .j  a  va  2s  . co  m*/
 * @param dialogMenu
 *            The dialog's menu.
 */
protected void fillDialogMenu(IMenuManager dialogMenu) {
    dialogMenu.add(new GroupMarker("SystemMenuStart")); //$NON-NLS-1$
    // RAP [bm]: Tracker
    // dialogMenu.add(new MoveAction());
    // dialogMenu.add(new ResizeAction());
    if (showPersistActions) {
        if (isUsing34API) {
            dialogMenu.add(new PersistLocationAction());
            dialogMenu.add(new PersistSizeAction());
        } else {
            dialogMenu.add(new PersistBoundsAction());
        }
    }
    dialogMenu.add(new Separator("SystemMenuEnd")); //$NON-NLS-1$
}

From source file:cz.cvut.kbss.owldiff.neonplugin.views.ODToolBar.java

License:Open Source License

private void createToolBar() {
    IToolBarManager mgr = part.getViewSite().getActionBars().getToolBarManager();

    mgr.add(odActions.getAction(OWLDiffAction.showCommon));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.showAxiomList));
    mgr.add(odActions.getAction(OWLDiffAction.showAssertedFrames));
    mgr.add(odActions.getAction(OWLDiffAction.showClassifiedFrames));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.manchester));
    mgr.add(odActions.getAction(OWLDiffAction.descriptionLogic));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.showExplanations));
    mgr.add(odActions.getAction(OWLDiffAction.useCEX));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.selectAllOriginal));
    mgr.add(odActions.getAction(OWLDiffAction.selectAllUpdate));
    mgr.add(odActions.getAction(OWLDiffAction.deselectAllOriginal));
    mgr.add(odActions.getAction(OWLDiffAction.deselectAllUpdate));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.merge));
    mgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}

From source file:cz.cvut.kbss.owldiff.neonplugin.views.ODViewMenu.java

License:Open Source License

private void createMenu() {
    IMenuManager mgr = part.getViewSite().getActionBars().getMenuManager();

    mgr.add(odActions.getAction(OWLDiffAction.showCommon));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.showAxiomList));
    mgr.add(odActions.getAction(OWLDiffAction.showAssertedFrames));
    mgr.add(odActions.getAction(OWLDiffAction.showClassifiedFrames));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.manchester));
    mgr.add(odActions.getAction(OWLDiffAction.descriptionLogic));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.showExplanations));
    mgr.add(odActions.getAction(OWLDiffAction.useCEX));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.selectAllOriginal));
    mgr.add(odActions.getAction(OWLDiffAction.selectAllUpdate));
    mgr.add(odActions.getAction(OWLDiffAction.deselectAllOriginal));
    mgr.add(odActions.getAction(OWLDiffAction.deselectAllUpdate));
    mgr.add(new Separator());
    mgr.add(odActions.getAction(OWLDiffAction.merge));
    mgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));

}

From source file:de.iteratec.logan.LoganActionBarAdvisor.java

License:Open Source License

@Override
protected void fillCoolBar(ICoolBarManager cbManager) {
    cbManager.add(new GroupMarker("group.file")); //$NON-NLS-1$
    { // File Group
        IToolBarManager fileToolBar = new ToolBarManager(cbManager.getStyle());
        fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP));
        fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
        fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP));
        fileToolBar.add(getAction(ActionFactory.SAVE.getId()));

        // Add to the cool bar manager
        cbManager.add(new ToolBarContributionItem(fileToolBar, IWorkbenchActionConstants.TOOLBAR_FILE));
    }//w w w .  j av a  2s  .  co m

    cbManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));

    cbManager.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
}

From source file:de.iteratec.logan.LoganActionBarAdvisor.java

License:Open Source License

/**
 * Creates and returns the 'File' menu./*from w  ww  .j  ava 2  s  .  co m*/
 * 
 * @return the created menu manager
 */
private MenuManager createFileMenu() {
    MenuManager menu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE); //$NON-NLS-1$
    menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));

    menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
    menu.add(getAction(ActionFactory.CLOSE.getId()));
    menu.add(getAction(ActionFactory.CLOSE_ALL.getId()));
    // menu.add(closeAllSavedAction);
    menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));
    menu.add(new Separator());
    menu.add(getAction(ActionFactory.SAVE.getId()));
    menu.add(getAction(ActionFactory.SAVE_AS.getId()));
    menu.add(getAction(ActionFactory.SAVE_ALL.getId()));

    menu.add(getAction(ActionFactory.REVERT.getId()));
    menu.add(ContributionItemFactory.REOPEN_EDITORS
            .create(getActionBarConfigurer().getWindowConfigurer().getWindow()));
    menu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
    menu.add(new Separator());
    menu.add(getAction(ActionFactory.QUIT.getId()));
    menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
    return menu;
}

From source file:de.loskutov.eclipseskins.ui.menu.StandardViewMenu.java

License:Open Source License

public StandardViewMenu(VSStackPresentation presentation, boolean addSystemActions) {
    menuManager = new MenuManager();
    IStackPresentationSite site = presentation.getSite();
    restore = new SystemMenuRestore(site);
    restore.setId("restore");
    UIUtils.initAction(restore);//from  w  w w  . j  ava2s  . co  m

    move = new SystemMenuMove(site, WorkbenchMessages.ViewPane_moveView, false);

    minimize = new SystemMenuMinimize(site);
    minimize.setId("minimize");
    UIUtils.initAction(minimize);

    maximize = new SystemMenuMaximize(site);
    maximize.setId("maximize");
    UIUtils.initAction(maximize);

    close = new SystemMenuClose(presentation);
    UIUtils.initAction(close);

    SystemMenuToggleTabs toggleTabs = new SystemMenuToggleTabs(presentation, isViewMenu());
    UIUtils.initAction(toggleTabs);

    SystemMenuToggleToolbar toggleToolbar = null;
    if (isViewMenu()) {
        toggleToolbar = new SystemMenuToggleToolbar(presentation);
        UIUtils.initAction(toggleToolbar);

        showView = new SystemMenuShowView(presentation);
    }

    { // Initialize system menu
        menuManager.add(new Separator("misc"));
        menuManager.add(new Separator("restore"));
        menuManager.add(new UpdatingActionContributionItem(restore));

        menuManager.add(move);
        menuManager.add(new GroupMarker("size"));
        menuManager.add(new GroupMarker("state"));
        menuManager.add(new UpdatingActionContributionItem(minimize));

        menuManager.add(new UpdatingActionContributionItem(maximize));
        menuManager.add(new Separator("toggle"));
        menuManager.add(toggleTabs);
        if (isViewMenu()) {
            menuManager.add(toggleToolbar);
        }
        if (isViewMenu()) {
            menuManager.add(showView);
        }
        menuManager.add(new Separator("list"));
        menuManager.add(new Separator("close"));
        menuManager.appendToGroup("close", close);
        if (addSystemActions) {
            site.addSystemActions(menuManager);
        }
    } // End of system menu initialization

    if (isViewMenu()) {
        sortEditorList = new SystemMenuSortTabs(presentation);
        UIUtils.initAction(sortEditorList);
        menuManager.appendToGroup("list", sortEditorList);
    }
}

From source file:de.quamoco.qm.application.QmWindowActionBarAdvisor.java

License:Apache License

/**
 * {@inheritDoc}// w  ww .  j a  v a 2  s.co m
 */
@Override
protected void fillMenuBar(IMenuManager menuBar) {
    IWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();
    menuBar.add(createFileMenu(window));
    menuBar.add(createEditMenu(window));
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(createWindowMenu(window));
    menuBar.add(createHelpMenu(window));
}

From source file:de.quamoco.qm.application.QmWindowActionBarAdvisor.java

License:Apache License

/**
 * Creates the 'File' menu./*w w  w  . j  a va  2 s  .  c o  m*/
 */
protected IMenuManager createFileMenu(IWorkbenchWindow window) {
    IMenuManager menu = new MenuManager(getString("_UI_Menu_File_label"), IWorkbenchActionConstants.M_FILE);
    menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));

    IMenuManager newMenu = new MenuManager(getString("_UI_Menu_New_label"), "new");
    newMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    // added
    newMenu.add(ContributionItemFactory.NEW_WIZARD_SHORTLIST.create(window));

    menu.add(newMenu);
    menu.add(new Separator());
    menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menu.add(new Separator());
    addToMenuAndRegister(menu, ActionFactory.CLOSE.create(window));
    addToMenuAndRegister(menu, ActionFactory.CLOSE_ALL.create(window));
    menu.add(new Separator());
    addToMenuAndRegister(menu, ActionFactory.SAVE.create(window));
    addToMenuAndRegister(menu, ActionFactory.SAVE_AS.create(window));
    addToMenuAndRegister(menu, ActionFactory.SAVE_ALL.create(window));
    menu.add(new Separator());
    addToMenuAndRegister(menu, ActionFactory.IMPORT.create(window));
    addToMenuAndRegister(menu, ActionFactory.EXPORT.create(window));
    menu.add(new Separator());
    addToMenuAndRegister(menu, ActionFactory.QUIT.create(window));
    menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
    return menu;
}

From source file:de.quamoco.qm.application.QmWindowActionBarAdvisor.java

License:Apache License

/**
 * Creates the 'Edit' menu./*from   w  w  w. j a va  2 s.co  m*/
 */
protected IMenuManager createEditMenu(IWorkbenchWindow window) {
    IMenuManager menu = new MenuManager(getString("_UI_Menu_Edit_label"), IWorkbenchActionConstants.M_EDIT);
    menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));

    addToMenuAndRegister(menu, ActionFactory.UNDO.create(window));
    addToMenuAndRegister(menu, ActionFactory.REDO.create(window));
    menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
    menu.add(new Separator());

    addToMenuAndRegister(menu, ActionFactory.CUT.create(window));
    addToMenuAndRegister(menu, ActionFactory.COPY.create(window));
    addToMenuAndRegister(menu, ActionFactory.PASTE.create(window));
    menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
    menu.add(new Separator());

    addToMenuAndRegister(menu, ActionFactory.DELETE.create(window));
    addToMenuAndRegister(menu, ActionFactory.SELECT_ALL.create(window));
    menu.add(new Separator());

    addToMenuAndRegister(menu, ActionFactory.FIND.create(window));

    menu.add(new GroupMarker(IWorkbenchActionConstants.ADD_EXT));

    menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
    menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    return menu;
}

From source file:de.quamoco.qm.application.QmWindowActionBarAdvisor.java

License:Apache License

/**
 * Creates the 'Window' menu./*from w  w w  . j  a  v a  2s.  c o  m*/
 */
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));

    // show view menu
    MenuManager showView = new MenuManager("Show View", "showView");
    showView.add(ContributionItemFactory.VIEWS_SHORTLIST.create(window));
    menu.add(showView);

    menu.add(ActionFactory.PREFERENCES.create(window));

    // suppress unnecessary actions
    removeActionSet("org.eclipse.ui.edit.text.actionSet.annotationNavigation");
    removeActionSet("org.eclipse.ui.edit.text.actionSet.navigation");
    removeActionSet("org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo");
    removeActionSet("org.eclipse.ui.actionSet.openFiles");
    removeActionSet("org.conqat.ide.core.model.modelActions");

    return menu;
}