private void cleanToolBar() { final ICoolBarManager coolBar = actionBarConfigurer.getCoolBarManager(); String contribID = null; // // toolbar = ((CoolBarManager2)coolBar).getControl(); // toolbar.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE)); // // toolbar.addPaintListener(new PaintListener() { // public void paintControl(PaintEvent e) { // Display display = e.display; // // toolbar.setBackground(DesignUIPlugin.getColor(COLOR_SSGHT.YELLOW_LIGHT2)); // // if (!paintListenerAttached) { // for (CoolItem it : toolbar.getItems()) { // if (it != null) { // it.getControl().setBackground(DesignUIPlugin.getColor(COLOR_SSGHT.YELLOW_LIGHT2)); // paintListenerAttached = true; // } // } // } // } // }); // toolbar.redraw(); for (IContributionItem contribItem : coolBar.getItems()) { contribID = contribItem.getId(); if (contribID != null && contribID.startsWith("org.eclipse.")) { coolBar.remove(contribItem); } } coolBar.update(true); // refresh the display of the cool bar }
@Override protected void fillCoolBar(ICoolBarManager coolBar) { super.fillCoolBar(coolBar); /* * File-related toolbar actions */ final IToolBarManager fileToolBar = new ToolBarManager(coolBar.getStyle()); fileToolBar.add(saveAsAction); fileToolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); coolBar.add(fileToolBar); }
protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); coolBar.add(new ToolBarContributionItem(toolbar, "main")); toolbar.add(openDbConnectionViewAction); toolbar.add(openRepositoriesViewAction); toolbar.add(openSoftwareInstalledViewAction); // toolbar.add(messagePopupAction); }
@Override protected void fillCoolBar(ICoolBarManager coolBar) { ToolBarManager toolBarManager = new ToolBarManager(SWT.ARROW_DOWN); coolBar.add(toolBarManager); toolBarManager.add(introAction); toolBarManager.add(saveAction); }
protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(coolBar.getStyle()); coolBar.add(toolbar); toolbar.add(clearAction); toolbar.add(newAction); toolbar.add(editAction); toolbar.add(renameAction); toolbar.add(deleteAction); toolbar.add(new Separator()); toolbar.add(openAllAction); toolbar.add(saveAction); toolbar.add(saveAsAction); toolbar.add(new Separator()); toolbar.add(prefsAction); toolbar.add(switchWorkspaceAction); toolbar.add(new Separator()); toolbar.add(showHelpAction); // toolbar.add(aboutAction); }
protected void fillCoolBar(ICoolBarManager coolBar) { final ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); coolBar.add(toolBarManager); toolBarManager.add(saveAction); toolBarManager.add(new Separator()); toolBarManager.add(undoAction); toolBarManager.add(redoAction); toolBarManager.add(openglAction); }
/** @generated */ protected void fillCoolBar(ICoolBarManager toolBar) { IMenuManager popUpMenu = new MenuManager(); popUpMenu.add(new ActionContributionItem(lockToolBarAction)); popUpMenu.add(new ActionContributionItem(toggleCoolbarAction)); toolBar.setContextMenuManager(popUpMenu); toolBar.add(new GroupMarker("group.file")); { IToolBarManager toolBarX = new ToolBarManager(); toolBarX.add(new Separator(IWorkbenchActionConstants.NEW_GROUP)); toolBarX.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT)); toolBarX.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP)); toolBarX.add(getAction(ActionFactory.SAVE.getId())); toolBarX.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT)); toolBarX.add(getAction(ActionFactory.PRINT.getId())); toolBarX.add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT)); // toolBarX.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); toolBar.add(new ToolBarContributionItem(toolBarX, IWorkbenchActionConstants.TOOLBAR_FILE)); } toolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); toolBar.add(new GroupMarker("group.nav")); toolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR)); toolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); { IToolBarManager toolBarX = new ToolBarManager(); toolBarX.add(new Separator(IWorkbenchActionConstants.GROUP_HELP)); toolBarX.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); toolBar.add(new ToolBarContributionItem(toolBarX, IWorkbenchActionConstants.TOOLBAR_HELP)); } }
protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); coolBar.add(new ToolBarContributionItem(toolbar, "main")); toolbar.add(exitAction); }