org.eclipse.jface.action.ICoolBarManager Java Examples
The following examples show how to use
org.eclipse.jface.action.ICoolBarManager.
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: 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 #2
Source File: ApplicationActionBarAdvisor.java From depan with Apache License 2.0 | 5 votes |
@Override protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(coolBar.getStyle()); toolbar.add(saveAction); toolbar.add(ContributionItemFactory.NEW_WIZARD_SHORTLIST .create(getActionBarConfigurer().getWindowConfigurer().getWindow())); coolBar.add(toolbar); // allow contributions here with id "additions" (MB_ADDITIONS) coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); }
Example #3
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 #4
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 #5
Source File: ApplicationActionBarAdvisor.java From jbt with Apache License 2.0 | 5 votes |
protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager firstCoolBar = new ToolBarManager(coolBar.getStyle()); coolBar.add(firstCoolBar); firstCoolBar.add(this.newBTAction); firstCoolBar.add(this.saveBTAction); firstCoolBar.add(this.saveBTAsAction); firstCoolBar.add(this.exportAsCppAction); firstCoolBar.add(this.openBTAction); firstCoolBar.add(this.loadMMPMDomainAction); coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); }
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 |
@Override protected void fillCoolBar(ICoolBarManager coolBar) { // Set up the context Menu coolbarPopupMenuManager = new MenuManager(); coolbarPopupMenuManager.add(new ActionContributionItem(lockToolBarAction)); coolBar.setContextMenuManager(coolbarPopupMenuManager); IMenuService menuService = (IMenuService) window.getService(IMenuService.class); menuService.populateContributionManager(coolbarPopupMenuManager, "popup:windowCoolbarContextMenu"); coolBar.add(new GroupMarker("group.file")); // File Group // IToolBarManager fileToolBar = new ToolBarManager(coolBar.getStyle()); // fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP)); // fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT)); // fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP)); // // 为了使工具栏和菜单中的图片大小不一样,重新创建新建 Action // newAction = ActionFactory.NEW_WIZARD_DROP_DOWN.create(window); // register(newAction); // ImageDescriptor newImage = // net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_NEW_PROJECT); // newAction.setImageDescriptor(newImage); // // 解决在 Windows 下图片显示错误的问题 // newAction.setDisabledImageDescriptor(newImage); // newAction.setToolTipText(Messages.getString("ts.ApplicationActionBarAdvisor.newAction")); // fileToolBar.add(newAction); // saveAction = ActionFactory.SAVE.create(window); // register(saveAction); // saveAction.setImageDescriptor(net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_SAVE)); // saveAction.setToolTipText("保存"); // fileToolBar.add(saveAction); // undoAction = ActionFactory.UNDO.create(window); // register(undoAction); // undoAction.setImageDescriptor(net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_UNDO)); // undoAction.setToolTipText("撤销"); // fileToolBar.add(undoAction); // // redoAction = ActionFactory.REDO.create(window); // register(redoAction); // redoAction.setImageDescriptor(net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_REDO)); // redoAction.setToolTipText("重做"); // fileToolBar.add(redoAction); // 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("group.new.menu")); coolBar.add(new GroupMarker("group.undoredo")); coolBar.add(new GroupMarker("group.copySource")); coolBar.add(new GroupMarker("group.search")); //createToolItem(coolBar); coolBar.add(new GroupMarker("group.findreplace")); coolBar.add(new GroupMarker("group.completeTranslation")); coolBar.add(new GroupMarker("group.approve")); coolBar.add(new GroupMarker("group.addTerm")); coolBar.add(new GroupMarker("group.preview")); coolBar.add(new GroupMarker("group.tagoperation")); coolBar.add(new GroupMarker("group.sourceoperation")); coolBar.add(new GroupMarker("group.deleteTrans")); coolBar.add(new GroupMarker("group.changeLayout")); coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); 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)); // // 按照设计文档的要求,先注释 helpSearchAction // // helpToolBar.add(helpSearchAction); // // Add the group for applications to contribute // helpToolBar.add(new GroupMarker("tagoperation")); // helpToolBar.add(new GroupMarker("pretranslation")); // // // Add to the cool bar manager // coolBar.add(new ToolBarContributionItem(helpToolBar, IWorkbenchActionConstants.TOOLBAR_HELP)); //coolBar.add(createToolItem(coolBar)); }
Example #8
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 #9
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 #10
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 ) ); } }
Example #11
Source File: ApplicationActionBarAdvisor.java From tmxeditor8 with GNU General Public License v2.0 | 2 votes |
@Override protected void fillCoolBar(ICoolBarManager coolBar) { // Set up the context Menu coolbarPopupMenuManager = new MenuManager(); coolbarPopupMenuManager.add(new ActionContributionItem(lockToolBarAction)); coolBar.setContextMenuManager(coolbarPopupMenuManager); IMenuService menuService = (IMenuService) window.getService(IMenuService.class); menuService.populateContributionManager(coolbarPopupMenuManager, "popup:windowCoolbarContextMenu"); coolBar.add(new GroupMarker("group.file")); coolBar.add(new GroupMarker("group.search")); createToolItem(coolBar); coolBar.add(new GroupMarker("group.new.menu")); coolBar.add(new GroupMarker("group.undoredo")); coolBar.add(new GroupMarker("group.tu")); coolBar.add(new GroupMarker("group.tmxtool")); coolBar.add(new GroupMarker("group.tmxclear")); coolBar.add(new GroupMarker("group.copySource")); coolBar.add(new GroupMarker("group.completeTranslation")); coolBar.add(new GroupMarker("group.approve")); coolBar.add(new GroupMarker("group.addTerm")); coolBar.add(new GroupMarker("group.preview")); coolBar.add(new GroupMarker("group.tagoperation")); coolBar.add(new GroupMarker("group.sourceoperation")); coolBar.add(new GroupMarker("group.deleteTrans")); coolBar.add(new GroupMarker("group.changeLayout")); coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR)); coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); //未提供 24 位图标,屏蔽工具栏。 // IToolBarManager toolbar = new ToolBarManager(coolBar.getStyle()); // coolBar.add(new ToolBarContributionItem(toolbar, "help")); // toolbar.add(helpAction); }
Example #12
Source File: ApplicationActionBarAdvisor.java From tmxeditor8 with GNU General Public License v2.0 | 2 votes |
@Override protected void fillCoolBar(ICoolBarManager coolBar) { // Set up the context Menu coolbarPopupMenuManager = new MenuManager(); coolbarPopupMenuManager.add(new ActionContributionItem(lockToolBarAction)); coolBar.setContextMenuManager(coolbarPopupMenuManager); IMenuService menuService = (IMenuService) window.getService(IMenuService.class); menuService.populateContributionManager(coolbarPopupMenuManager, "popup:windowCoolbarContextMenu"); coolBar.add(new GroupMarker("group.file")); coolBar.add(new GroupMarker("group.new.menu")); coolBar.add(new GroupMarker("group.undoredo")); coolBar.add(new GroupMarker("group.copySource")); coolBar.add(new GroupMarker("group.search")); createToolItem(coolBar); coolBar.add(new GroupMarker("group.completeTranslation")); coolBar.add(new GroupMarker("group.approve")); coolBar.add(new GroupMarker("group.addTerm")); coolBar.add(new GroupMarker("group.preview")); coolBar.add(new GroupMarker("group.tagoperation")); coolBar.add(new GroupMarker("group.sourceoperation")); coolBar.add(new GroupMarker("group.deleteTrans")); coolBar.add(new GroupMarker("group.changeLayout")); coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR)); coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); }