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:com.nokia.tools.variant.carbidev.ApplicationActionBarAdvisor.java

License:Open Source License

private MenuManager createFileMenu() {
    MenuManager fileMenu = new MenuManager("&File", "rcpFile");
    fileMenu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
    fileMenu.add(new GroupMarker("openasnew"));
    fileMenu.add(closeAction);/*from w ww  .  ja va  2s.c o m*/
    fileMenu.add(closeAllAction);
    fileMenu.add(new Separator());
    fileMenu.add(saveAction);
    fileMenu.add(saveAsAction);
    fileMenu.add(exportDataAsConfML);
    // Copy and Report moved to Tools
    // fileMenu.add(new Separator());
    // fileMenu.add(new GroupMarker("copy"));
    // fileMenu.add(new
    // GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    fileMenu.add(new Separator());
    fileMenu.add(exitAction);
    fileMenu.add(new Separator());
    fileMenu.add(reopen);
    return fileMenu;
}

From source file:com.nokia.tools.variant.carbidev.ApplicationActionBarAdvisor.java

License:Open Source License

private MenuManager createToolsMenu() {
    MenuManager toolsMenu = new MenuManager("&Tools", "rcpTools");
    toolsMenu.add(new GroupMarker("copy"));
    toolsMenu.add(new GroupMarker("report"));

    return toolsMenu;
}

From source file:com.nokia.tools.variant.carbidev.ApplicationActionBarAdvisor.java

License:Open Source License

@Override
protected void fillCoolBar(ICoolBarManager coolBar) {
    IToolBarManager tb = new ToolBarManager(coolBar.getStyle());
    tb.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
    tb.add(saveAction);//from  w  w w. j  a  va2s .c  om
    tb.add(saveAsAction);
    tb.add(exportDataAsConfML);
    tb.add(new Separator());
    tb.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    coolBar.add(new ToolBarContributionItem(tb, "rcpMain"));

    // IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
    // coolBar.add(new ToolBarContributionItem(toolbar, "rcpMain"));
    // toolbar.add(saveAction);
    // toolbar.add(saveAsAction);
    // removing unwanted actions
    removeAction("org.eclipse.ui.edit.text.actionSet.navigation");
    removeAction("org.eclipse.ui.edit.text.actionSet.annotationNavigation");
}

From source file:com.nokia.tools.vct.internal.common.secure.ui.editor.KeyManagerEditor.java

License:Open Source License

private void createContextMenu(Viewer viewer) {
    MenuManager menuMgr = new MenuManager("#KeyStoreManagerMenu");
    menuMgr.setRemoveAllWhenShown(true);

    menuMgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    getSite().registerContextMenu(menuMgr, viewer);

    menuMgr.addMenuListener(new IMenuListener() {
        public void menuAboutToShow(IMenuManager menuMgr) {
            fillMenu(menuMgr);/*from w  w w  .  j  a  va  2  s.  c o m*/
        }
    });
    Menu menu = menuMgr.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    this.menuManager = menuMgr;
}

From source file:com.predic8.rcp.membrane.ApplicationActionBarAdvisor.java

License:Apache License

protected void fillMenuBar(IMenuManager menuBar) {

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

    menuBar.add(fileMenu);/*from w w  w. j a  v  a 2s.c  o  m*/
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(windowMenu);
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(helpMenu);

    windowMenu.add(preferencesAction);

    helpMenu.add(aboutAction);
    helpMenu.add(new Separator());

}

From source file:com.predic8.rcp.membrane_client.ApplicationActionBarAdvisor.java

License:Apache License

protected void fillMenuBar(IMenuManager menuBar) {
    MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
    fileMenu.remove("org.eclipse.ui.openLocalFile");
    fileMenu.add(new Separator());
    fileMenu.add(exitAction);//www  .  java2 s  .c  o m

    MenuManager windowMenu = new MenuManager("&Window", IWorkbenchActionConstants.M_WINDOW);
    windowMenu.add(preferencesAction);

    MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
    helpMenu.remove("org.eclipse.ui.actions.showKeyAssistHandler");
    helpMenu.add(aboutAction);
    helpMenu.add(new Separator());

    menuBar.add(fileMenu);
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(windowMenu);
    menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    menuBar.add(helpMenu);

    removeUnwantedMenuItems();
}

From source file:com.quantcomponents.ui.algo.TradingManagersView.java

License:Open Source License

private void fillContextMenu(IMenuManager menuMgr) {
    if (currentlySelectedObject instanceof TradingAgentFactoryWrapper) {
        menuMgr.add(createTradingAgentConfiguration);
    }//from www  .j a  va 2  s.  c  om
    if (currentlySelectedObject instanceof TradingAgentConfigurationWrapper) {
        menuMgr.add(createTradingAgentBinding);
        menuMgr.add(new Separator());
        menuMgr.add(viewTradingAgentConfiguration);
    }
    if (currentlySelectedObject instanceof TradingAgentBindingWrapper) {
        menuMgr.add(executeSimulatedTradingAgentBinding);
        menuMgr.add(executeLiveTradingAgentBinding);
        menuMgr.add(new Separator());
        menuMgr.add(viewTradingAgentBinding);
    }
    if (currentlySelectedObject instanceof TradingAgentExecutionWrapper) {
        menuMgr.add(pauseExecution);
        menuMgr.add(resumeExecution);
        menuMgr.add(killExecution);
    }
    menuMgr.add(new Separator());
    menuMgr.add(delete);
    menuMgr.add(new Separator());
    menuMgr.add(refreshTree);
    menuMgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}

From source file:com.quantcomponents.ui.marketdata.MarketDataManagersView.java

License:Open Source License

private void fillContextMenu(IMenuManager menuMgr) {
    if (multipleStockDatabaseSelection.size() > 0) {
        menuMgr.add(openViewAction);/*from w  ww . java 2  s .c  o m*/
        menuMgr.add(removeStockDatabaseAction);
    }
    if (selectedMarketDataManager != null) {
        menuMgr.add(addStockDatabaseAction);
        menuMgr.add(refreshAction);
        if (selectedMarketDataManager instanceof RealTimeMarketDataManagerPresentationWrapper) {
            menuMgr.add(startAutoUpdateAction);
            menuMgr.add(stopAutoUpdateAction);
        }
    }
    menuMgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}

From source file:com.quantcomponents.ui.marketdata.StockDatabaseChartView.java

License:Open Source License

private void fillContextMenu(IMenuManager menuMgr) {
    menuMgr.add(showChartDialog);
    menuMgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}

From source file:com.randomwalking.eclipse.console.terminal.TerminalConsolePage.java

License:Open Source License

protected void createActions() {
    final IActionBars actionBars = getSite().getActionBars();

    clearConsoleAction = new ClearTerminalConsoleAction(terminal, "Clear", "Clear Console");

    closeConsoleAction = new CloseTerminalConsoleAction((TerminalConsole) getConsole(), "Close",
            "Close Terminal");
    final IActionBars bars = getSite().getActionBars();
    final IToolBarManager toolbarManager = bars.getToolBarManager();

    toolbarManager.prependToGroup(IConsoleConstants.LAUNCH_GROUP, new GroupMarker(SCRIPT_GROUP));
    toolbarManager.appendToGroup(SCRIPT_GROUP, new Separator());
    toolbarManager.appendToGroup(SCRIPT_GROUP, closeConsoleAction);

    toolbarManager.appendToGroup(SCRIPT_GROUP, new Separator());
    toolbarManager.appendToGroup(SCRIPT_GROUP, clearConsoleAction);

    actionBars.updateActionBars();//from ww  w .j  a  v a  2  s. co  m
}