Java Code Examples for org.eclipse.jface.action.ICoolBarManager#getStyle()

The following examples show how to use org.eclipse.jface.action.ICoolBarManager#getStyle() . 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 depan with Apache License 2.0 5 votes vote down vote up
@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 2
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
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 3
Source File: ApplicationActionBarAdvisor.java    From jbt with Apache License 2.0 5 votes vote down vote up
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 4
Source File: ApplicationActionBarAdvisor.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
private IToolBarManager createToolItem(ICoolBarManager coolBar) {
	IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle());
	coolBar.add(new ToolBarContributionItem(toolBar, "findreplace"));
	toolBar.add(findAction);
	return toolBar;
}
 
Example 5
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
private IToolBarManager createToolItem(ICoolBarManager coolBar) {
	IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle());
	coolBar.add(new ToolBarContributionItem(toolBar, "findreplace"));
	toolBar.add(findAction);
	return toolBar;
}
 
Example 6
Source File: DesignerActionBarAdvisor.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
/**
	 * 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 ) );
		}

	}