org.eclipse.jface.action.ToolBarContributionItem Java Examples
The following examples show how to use
org.eclipse.jface.action.ToolBarContributionItem.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApplicationWorkbenchWindowAdvisor.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
/** * 删除 RCP 自带的工具栏按钮 */ public void postWindowCreate() { IActionBarConfigurer actionBarConfigurer = getWindowConfigurer().getActionBarConfigurer(); IContributionItem[] coolItems = actionBarConfigurer.getCoolBarManager().getItems(); for (int i = 0; i < coolItems.length; i++) { if (coolItems[i] instanceof ToolBarContributionItem) { ToolBarContributionItem toolbarItem = (ToolBarContributionItem) coolItems[i]; if (toolbarItem.getId().equals("org.eclipse.ui.WorkingSetActionSet") || toolbarItem.getId().equals("org.eclipse.ui.edit.text.actionSet.annotationNavigation") || toolbarItem.getId().equals("org.eclipse.ui.edit.text.actionSet.navigation")) { toolbarItem.getToolBarManager().removeAll(); } } } actionBarConfigurer.getCoolBarManager().update(true); addAutoPluginMenu(); }
Example #2
Source File: ApplicationWorkbenchWindowAdvisor.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
/** * 删除 RCP 自带的工具栏按钮 */ public void postWindowCreate() { IActionBarConfigurer actionBarConfigurer = getWindowConfigurer().getActionBarConfigurer(); IContributionItem[] coolItems = actionBarConfigurer.getCoolBarManager().getItems(); for (int i = 0; i < coolItems.length; i++) { if (coolItems[i] instanceof ToolBarContributionItem) { ToolBarContributionItem toolbarItem = (ToolBarContributionItem) coolItems[i]; if (toolbarItem.getId().equals("org.eclipse.ui.WorkingSetActionSet") || toolbarItem.getId().equals("org.eclipse.ui.edit.text.actionSet.annotationNavigation") || toolbarItem.getId().equals("org.eclipse.ui.edit.text.actionSet.navigation")) { toolbarItem.getToolBarManager().removeAll(); } } } actionBarConfigurer.getCoolBarManager().update(true); addAutoPluginMenu(); }
Example #3
Source File: ApplicationActionBarAdvisor.java From neoscada with Eclipse Public License 1.0 | 5 votes |
@Override protected void fillCoolBar ( final ICoolBarManager coolBar ) { final IToolBarManager toolbar = new ToolBarManager ( SWT.FLAT | SWT.RIGHT ); coolBar.add ( new ToolBarContributionItem ( toolbar, "main" ) ); toolbar.add ( getAction ( ActionFactory.NEW_WIZARD_DROP_DOWN.getId () ) ); coolBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) ); }
Example #4
Source File: ApplicationActionBarAdvisor.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
private IToolBarManager createToolItem(ICoolBarManager coolBar) { IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle()); coolBar.add(new ToolBarContributionItem(toolBar, "findreplace")); //没有设计 24 的图标,所以屏蔽工具栏 // toolBar.add(cutAction); // toolBar.add(copyAction); // toolBar.add(pasteAction); // toolBar.add(findAction); return toolBar; }
Example #5
Source File: ClientActionBarAdvisor.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * This operation overrides fillCoolBar to setup the CoolBar for ICE. * * @param coolBar * - A manager for the CoolBar. */ @Override public void fillCoolBar(ICoolBarManager coolBar) { // Local Declarations IToolBarManager toolBar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); // Register the create Item Action toolBar.add(createItemAction); // Register the connect Action; // Register the save actions toolBar.add(saveAction); toolBar.add(saveAllAction); // Register the import action toolBar.add(importFileAction); // Register the launch Mesh Editor action. toolBar.add(launchMeshEditorAction); // Register the import input file action for Items toolBar.add(openImportWizardAction); // Add the save toolbar to the CoolBar coolBar.add(new ToolBarContributionItem(toolBar, "iceTools")); return; }
Example #6
Source File: RcpActionBarAdvisor.java From olca-app with Mozilla Public License 2.0 | 5 votes |
@Override protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.LEFT); coolBar.add(new ToolBarContributionItem(toolbar, "main")); toolbar.add(Actions.create( M.Home, Icon.HOME.descriptor(), StartPage::open)); toolbar.add(saveAction); toolbar.add(saveAsAction); toolbar.add(saveAllAction); coolBar.add(toolbar); }
Example #7
Source File: ApplicationActionBarAdvisor.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
private IToolBarManager createToolItem(ICoolBarManager coolBar) { IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle()); coolBar.add(new ToolBarContributionItem(toolBar, "findreplace")); toolBar.add(findAction); return toolBar; }
Example #8
Source File: ApplicationActionBarAdvisor.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
private IToolBarManager createToolItem(ICoolBarManager coolBar) { IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle()); coolBar.add(new ToolBarContributionItem(toolBar, "findreplace")); toolBar.add(findAction); return toolBar; }
Example #9
Source File: DesignerActionBarAdvisor.java From birt with Eclipse Public License 1.0 | 4 votes |
/** * Fills the coolbar with the workbench actions. */ protected void fillCoolBar( ICoolBarManager coolBar ) { { // Set up the context Menu IMenuManager popUpMenu = new MenuManager( ); popUpMenu.add( new ActionContributionItem( lockToolBarAction ) ); coolBar.setContextMenuManager( popUpMenu ); } coolBar.add( new GroupMarker( IWorkbenchActionConstants.GROUP_FILE ) ); { // File Group IToolBarManager fileToolBar = new ToolBarManager( coolBar.getStyle( ) ); fileToolBar.add(new NewWizardDropDownAction( window)); // fileToolBar.add( newReportAction ); // fileToolBar.add( newLibraryAction ); // fileToolBar.add( newReportTemplateAction ); fileToolBar.add( new GroupMarker( IWorkbenchActionConstants.NEW_EXT ) ); fileToolBar.add( new GroupMarker( IWorkbenchActionConstants.SAVE_GROUP ) ); fileToolBar.add( saveAction ); fileToolBar.add( new GroupMarker( IWorkbenchActionConstants.SAVE_EXT ) ); fileToolBar.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) ); // Add to the cool bar manager coolBar.add( new ToolBarContributionItem( fileToolBar, IWorkbenchActionConstants.TOOLBAR_FILE ) ); } coolBar.add( new GroupMarker( IWorkbenchActionConstants.MB_ADDITIONS ) ); // coolBar.add( new GroupMarker( IWorkbenchConstants.GROUP_NAV ) ); { // Navigate group IToolBarManager navToolBar = new ToolBarManager( coolBar.getStyle( ) ); navToolBar.add( new Separator( IWorkbenchActionConstants.HISTORY_GROUP ) ); navToolBar.add( new GroupMarker( IWorkbenchActionConstants.GROUP_APP ) ); navToolBar.add( backwardHistoryAction ); navToolBar.add( forwardHistoryAction ); navToolBar.add( new Separator( IWorkbenchActionConstants.PIN_GROUP ) ); navToolBar.add( pinEditorContributionItem ); // Add to the cool bar manager coolBar.add( new ToolBarContributionItem( navToolBar, IWorkbenchActionConstants.TOOLBAR_NAVIGATE ) ); } coolBar.add( new GroupMarker( IWorkbenchActionConstants.GROUP_EDITOR ) ); coolBar.add( new GroupMarker( IWorkbenchActionConstants.GROUP_HELP ) ); { // Help group IToolBarManager helpToolBar = new ToolBarManager( coolBar.getStyle( ) ); helpToolBar.add( new Separator( IWorkbenchActionConstants.GROUP_HELP ) ); // Add the group for applications to contribute helpToolBar.add( new GroupMarker( IWorkbenchActionConstants.GROUP_APP ) ); // Add to the cool bar manager coolBar.add( new ToolBarContributionItem( helpToolBar, IWorkbenchActionConstants.TOOLBAR_HELP ) ); } }