Example usage for org.eclipse.jface.action IToolBarManager appendToGroup

List of usage examples for org.eclipse.jface.action IToolBarManager appendToGroup

Introduction

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

Prototype

void appendToGroup(String groupName, IAction action);

Source Link

Document

Adds a contribution item for the given action at the end of the group with the given name.

Usage

From source file:ar.com.tadp.xml.rinzo.jdt.wizards.MessageConsoleParticipant.java

License:Open Source License

public void init(IPageBookViewPage page, IConsole console) {
    IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
    this.closeAction = new CloseConsoleAction(console);
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, this.closeAction);
}

From source file:cn.dockerfoundry.ide.eclipse.server.ui.internal.console.DockerFoundryConsolePageParticipant.java

License:Open Source License

public void init(IPageBookViewPage page, IConsole console) {
    closeAction = new CloseConsoleAction(console);

    IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
}

From source file:com.aptana.ide.syncing.ui.navigator.actions.SyncingActionProvider.java

License:Open Source License

private boolean updateToolbar(IToolBarManager toolbar, boolean hasSyncConnection) {
    boolean updated = false;
    IContributionItem[] items = toolbar.getItems();
    if (hasSyncConnection) {
        // adds the syncing items back, but only needs to do it once until after the next time hasSyncConnection is
        // false//  w w w  .  ja  va 2 s . c o  m
        for (IContributionItem hiddenItem : hiddenItems) {
            toolbar.appendToGroup(GROUP_SYNCING, hiddenItem);
        }
        updated = hiddenItems.size() > 0;
        hiddenItems.clear();
    } else {
        // removes the syncing items
        for (IContributionItem item : items) {
            if (item instanceof ActionContributionItem) {
                if (((ActionContributionItem) item).getAction() instanceof NavigatorBaseSyncAction) {
                    toolbar.remove(item);
                    hiddenItems.add(item);
                    updated = true;
                }
            }
        }
    }
    return updated;
}

From source file:com.aptana.interactive_console.console.ui.internal.ScriptConsolePage.java

License:Open Source License

protected void createActions() {
    super.createActions();

    proposalsAction = new ContentAssistProposalsAction(getViewer());
    quickAssistAction = new QuickAssistProposalsAction(getViewer());

    saveSessionAction = new SaveConsoleSessionAction((ScriptConsole) getConsole(),
            ScriptConsoleMessages.SaveSessionAction, ScriptConsoleMessages.SaveSessionTooltip);

    closeConsoleAction = new CloseScriptConsoleAction((ScriptConsole) getConsole(),
            ScriptConsoleMessages.TerminateConsoleAction, ScriptConsoleMessages.TerminateConsoleTooltip);

    IActionBars bars = getSite().getActionBars();

    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, saveSessionAction);

    ScriptConsole console = (ScriptConsole) getConsole();
    console.createActions(toolbarManager);

    bars.updateActionBars();// w ww . j  a  v  a 2  s . com
}

From source file:com.arc.cdt.debug.seecode.internal.ui.action.AnimateToolBarManager.java

License:Open Source License

private void addAnimateItems(IViewPart view) {
    IToolBarManager toolbarMgr = getToolBar(view);
    toolbarMgr.add(groupMarker);//from w w  w .  ja  v  a  2 s.c o  m
    toolbarMgr.appendToGroup(ANIMATE_GROUP, animateStepIntoAction);
    toolbarMgr.appendToGroup(ANIMATE_GROUP, animateStepOverAction);
    toolbarMgr.appendToGroup(ANIMATE_GROUP, counter);
    toolbarMgr.appendToGroup(ANIMATE_GROUP, animateFaster);
    toolbarMgr.appendToGroup(ANIMATE_GROUP, animateSlower);
    toolbarMgr.appendToGroup(ANIMATE_GROUP, speedLabel);
    view.getViewSite().getActionBars().updateActionBars();
}

From source file:com.archimatetool.canvas.CanvasEditorActionBarContributor.java

License:Open Source License

@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
    super.contributeToToolBar(toolBarManager);
    toolBarManager.appendToGroup(GROUP_TOOLBAR_END, getAction(ResetAspectRatioAction.ID));
}

From source file:com.cloudbees.eclipse.dev.ui.views.jobs.JobConsolePageParticipant.java

License:Open Source License

public void init(final IPageBookViewPage page, final IConsole console) {
    IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, new CloseConsoleAction(console));
}

From source file:com.cloudbees.eclipse.run.ui.console.CloseConsolePageParticipant.java

License:Open Source License

public void init(IPageBookViewPage page, IConsole console) {
    closeAction = new CloseConsoleAction(console);
    IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
}

From source file:com.drgarbage.bytecodevisualizer.actions.DynamicPartsManager.java

License:Apache License

private static void addActions(IDebugView viewPart) {
    IToolBarManager tbm = viewPart.getViewSite().getActionBars().getToolBarManager();

    /* FIX: bug, adding of actions */
    IContributionItem ci = tbm.find(BytecodeVisualizerConstants.BYTECODE_VISUALIZER_GROUP);
    if (ci != null) {
        return;/*from ww  w  .j a  v  a2  s  .c  o  m*/
    }

    tbm.add(new Separator(BytecodeVisualizerConstants.BYTECODE_VISUALIZER_GROUP));
    tbm.appendToGroup(BytecodeVisualizerConstants.BYTECODE_VISUALIZER_GROUP,
            new DebugActionContributionItem(new StepIntoBytecodeAction(viewPart)));
    tbm.appendToGroup(BytecodeVisualizerConstants.BYTECODE_VISUALIZER_GROUP,
            new DebugActionContributionItem(new StepOverSingleInstructionAction(viewPart)));
    viewPart.getViewSite().getActionBars().updateActionBars();

    tbm.appendToGroup(BytecodeVisualizerConstants.BYTECODE_VISUALIZER_GROUP,
            new DebugActionContributionItem(new GetClassesFromJVMAction(viewPart)));
    viewPart.getViewSite().getActionBars().updateActionBars();

}

From source file:com.google.cloud.tools.eclipse.appengine.deploy.ui.DeployConsolePageParticipant.java

License:Apache License

private void configureToolBar(IToolBarManager toolbarManager) {
    terminateAction = createTerminateAction();
    toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAction);

    closeAction = createCloseAction();/*from   ww  w .j  av  a 2s  .  c  o  m*/
    toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
}