List of usage examples for org.eclipse.jface.action IToolBarManager appendToGroup
void appendToGroup(String groupName, IAction action);
From source file:org.cloudfoundry.ide.eclipse.server.ui.internal.console.CloudFoundryConsolePageParticipant.java
License:Open Source License
public void init(IPageBookViewPage page, IConsole console) { if (isCloudFoundryConsole(console)) { CloseConsoleAction closeAction = new CloseConsoleAction(console); closeAction.setImageDescriptor(CloudFoundryImages.CLOSE_CONSOLE); IToolBarManager manager = page.getSite().getActionBars().getToolBarManager(); manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction); }/*w ww . j av a 2s.c om*/ }
From source file:org.codehaus.groovy.eclipse.ui.console.GroovyConsolePage.java
License:Apache License
@Override protected void configureToolBar(IToolBarManager mgr) { super.configureToolBar(mgr); mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fScrollLockAction); mgr.appendToGroup(IConsoleConstants.LAUNCH_GROUP, fCloseConsoleAction); }
From source file:org.dawb.tango.extensions.console.TangoSpecConsoleActions.java
License:Open Source License
@Override public void init(final IPageBookViewPage page, final IConsole console) { if (!(page instanceof TangoSpecConsolePage)) return;//w w w . j av a2 s . c o m this.page = (TangoSpecConsolePage) page; this.bars = page.getSite().getActionBars(); this.preferences = new Action("Tango Preferences...", Activator.imageDescriptorFromPlugin("icons/tango_preferences.gif")) { public void run() { try { (new TangoPreferencesAction()).execute(null); } catch (ExecutionException e) { e.printStackTrace(); } } }; this.stop = new Action("Stop spec session", Activator.imageDescriptorFromPlugin("icons/stop_spec_console.gif")) { public void run() { IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager(); manager.removeConsoles(new IConsole[] { console }); } }; bars.getMenuManager().add(new Separator()); bars.getMenuManager().add(preferences); IToolBarManager toolbarManager = bars.getToolBarManager(); toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, stop); toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, preferences); bars.updateActionBars(); }
From source file:org.eclipse.birt.chart.examples.view.ChartExamplesView.java
License:Open Source License
public void createPartControl(Composite parent) { ChartUIUtil.bindHelp(parent, ChartHelpContextIds.VIEW_CHART_EXAMPLE); instance = new ChartExamples(parent); final IActionBars actionBars = getViewSite().getActionBars(); IToolBarManager toolbarManager = actionBars.getToolBarManager(); Tools tools[] = ChartExamples.tools; String group = tools[0].group; toolbarManager.add(new GroupMarker(group)); for (int i = 0; i < tools.length; i++) { Tools tool = tools[i];/*from w ww . j a v a 2s.c o m*/ if (!tool.group.equals(group)) { toolbarManager.add(new Separator()); toolbarManager.add(new GroupMarker(tool.group)); } group = tool.group; toolbarManager.appendToGroup(group, initActions(tool, parent)); } actionBars.updateActionBars(); }
From source file:org.eclipse.buildship.ui.console.GradleConsolePageParticipant.java
License:Open Source License
private void addActionsToToolbar(IToolBarManager toolBarManager, GradleConsole gradleConsole) { this.cancelBuildExecutionAction = new CancelBuildExecutionAction(gradleConsole); this.removeConsoleAction = new RemoveTerminatedGradleConsoleAction(gradleConsole); this.removeAllConsolesAction = new RemoveAllTerminatedConsolesAction(gradleConsole); toolBarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, this.cancelBuildExecutionAction); toolBarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, this.removeConsoleAction); toolBarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, this.removeAllConsolesAction); }
From source file:org.eclipse.buildship.ui.taskview.UiContributionManager.java
License:Open Source License
private void fillToolbar() { IToolBarManager manager = this.taskView.getViewSite().getActionBars().getToolBarManager(); manager.add(new GroupMarker(TASK_MISC_GROUP)); manager.appendToGroup(TASK_MISC_GROUP, new RefreshViewAction(UiPluginConstants.REFRESH_TASKVIEW_COMMAND_ID)); manager.appendToGroup(TASK_MISC_GROUP, new ToggleLinkToSelectionAction(this.taskView)); manager.add(new Separator(TASK_FILTERING_GROUP)); manager.appendToGroup(TASK_FILTERING_GROUP, new FilterTaskSelectorsAction(this.taskView)); manager.appendToGroup(TASK_FILTERING_GROUP, new FilterProjectTasksAction(this.taskView)); manager.appendToGroup(TASK_FILTERING_GROUP, new FilterPrivateTasksAction(this.taskView)); manager.add(new Separator(TASK_SORTING_GROUP)); manager.appendToGroup(TASK_SORTING_GROUP, new SortTasksByTypeAction(this.taskView)); manager.appendToGroup(TASK_SORTING_GROUP, new SortTasksByVisibilityAction(this.taskView)); }
From source file:org.eclipse.buildship.ui.view.execution.ExecutionPage.java
License:Open Source License
private void populateToolBar() { IActionBars actionBars = getSite().getActionBars(); IToolBarManager toolbarManager = actionBars.getToolBarManager(); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new ExpandTreeNodesAction(getPageControl().getViewer())); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new CollapseTreeNodesAction(getPageControl().getViewer())); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new ShowFilterAction(getPageControl())); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new Separator()); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new SwitchToConsoleViewAction(this)); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new Separator()); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new RerunFailedTestsAction(this)); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new Separator()); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new CancelBuildExecutionAction(this)); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new RerunBuildExecutionAction(this)); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new RemoveTerminatedExecutionPageAction(this)); toolbarManager.appendToGroup(MultiPageView.PAGE_GROUP, new RemoveAllTerminatedExecutionPagesAction(this)); toolbarManager.update(true);//from ww w . j a va 2 s . c o m }
From source file:org.eclipse.buildship.ui.view.execution.ExecutionsView.java
License:Open Source License
@Override public void init(IViewSite site) throws PartInitException { super.init(site); // load the persisted state before we create any UI components that query for some state this.state = new ExecutionViewState(); this.state.load(); // create the global actions this.switchPagesAction = new ActionContributionItem( new SwitchToNextPageAction(this, ExecutionViewMessages.Action_SwitchExecutionPage_Tooltip)); this.switchPagesAction.setVisible(false); // add actions to the global toolbar of the executions view IToolBarManager toolBarManager = site.getActionBars().getToolBarManager(); toolBarManager.appendToGroup(PART_GROUP, this.switchPagesAction); // add actions to the global menu of the executions view IMenuManager menuManager = site.getActionBars().getMenuManager(); menuManager.add(new ToggleShowTreeHeaderAction(this, this.state)); }
From source file:org.eclipse.buildship.ui.view.task.UiContributionManager.java
License:Open Source License
private void populateToolBar() { IToolBarManager manager = this.taskView.getViewSite().getActionBars().getToolBarManager(); manager.add(new GroupMarker(TOOLBAR_TREE_GROUP)); manager.appendToGroup(TOOLBAR_TREE_GROUP, new ExpandTreeNodesAction(this.taskView.getTreeViewer())); manager.appendToGroup(TOOLBAR_TREE_GROUP, new CollapseTreeNodesAction(this.taskView.getTreeViewer())); manager.appendToGroup(TOOLBAR_TREE_GROUP, new ShowFilterAction(this.taskView.getFilteredTree())); manager.appendToGroup(TOOLBAR_TREE_GROUP, new Separator()); manager.add(new GroupMarker(TOOLBAR_MISC_GROUP)); manager.appendToGroup(TOOLBAR_MISC_GROUP, new RefreshViewAction(UiPluginConstants.REFRESH_TASKVIEW_COMMAND_ID)); manager.appendToGroup(TOOLBAR_MISC_GROUP, new ToggleLinkToSelectionAction(this.taskView)); }
From source file:org.eclipse.cdt.dsf.gdb.internal.ui.console.ConsolePageParticipant.java
License:Open Source License
@Override public void init(IPageBookViewPage page, IConsole console) { fPage = page;/*from www . ja va 2 s. c o m*/ fConsole = console; fView = (IConsoleView) fPage.getSite().getPage().findView(IConsoleConstants.ID_CONSOLE_VIEW); if (isConsoleInferior(console) || isConsoleGdbCli(console)) { // This console participant will affect all consoles, even those not for DSF-GDB. // Only consoles for GDBProcess or InferiorRuntimeProcess are what we care about for DSF-GDB DebugUITools.getDebugContextManager().getContextService(fPage.getSite().getWorkbenchWindow()) .addDebugContextListener(this); } if (console instanceof TracingConsole || isConsoleGdbCli(console)) { TextConsole textConsole = (TextConsole) console; // Add the save console action IToolBarManager toolBarManager = page.getSite().getActionBars().getToolBarManager(); toolBarManager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator()); ConsoleSaveAction saveConsole = new ConsoleSaveAction(textConsole); toolBarManager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, saveConsole); toolBarManager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator()); } }