makeActions(actionBarConfigurer.getWindowConfigurer().getWindow()); fillMenuBar(actionBarConfigurer.getMenuManager()); menuCreated = true; fillCoolBar(actionBarConfigurer.getCoolBarManager()); fillStatusLine(actionBarConfigurer.getStatusLineManager());
if (definitionId != null) { IActionCommandMappingService mapping = getActionBarConfigurer() .getWindowConfigurer().getWindow() .getService(IActionCommandMappingService.class); if (mapping != null) { getActionBarConfigurer().registerGlobalAction(action);
/** * Constructs a new action builder which contributes actions * to the given window. * * @param configurer the action bar configurer for the window */ public WorkbenchActionBuilder(IActionBarConfigurer configurer) { super(configurer); window = configurer.getWindowConfigurer().getWindow(); }
.getCoolBarManager(); IContributionItem cbItem = coolBarManager .find(IWorkbenchActionConstants.TOOLBAR_NAVIGATE);
@Override public void run() { //register this action instance as the global handler for the build last action setActionDefinitionId("org.eclipse.ui.project.buildLast"); //$NON-NLS-1$ actionBars.registerGlobalAction(this); window.getWorkbench().getWorkingSetManager().addRecentWorkingSet(workingSet); IProject[] projects = BuildUtilities.extractProjects(workingSet.getElements()); if (projects.length == 0) { MessageDialog.openInformation(window.getShell(), IDEWorkbenchMessages.BuildSetAction_noBuildTitle, IDEWorkbenchMessages.BuildSetAction_noProjects); return; } lastBuilt = this; BuildAction build = new BuildAction(window, IncrementalProjectBuilder.INCREMENTAL_BUILD); build.selectionChanged(new StructuredSelection(projects)); build.run(); }
getActionBarConfigurer().getStatusLineManager().remove(statusLineItem); if (pageListener != null) { window.removePageListener(pageListener);
/** * Disposes this action bar advisor. Called when the window is being closed. * This should dispose any allocated resources and remove any added listeners. * <p> * The default implementation calls <code>disposeActions()</code> and releases * menu manager. Subclasses may extend. * </p> */ public void dispose() { if (menuCreated) { IMenuManager menuManager = actionBarConfigurer.getMenuManager(); if (menuManager != null) { // dispose menu asynchronously to avoid "jumping" UI elements PlatformUI.getWorkbench().getDisplay().asyncExec(menuManager::dispose); } } disposeActions(); }
@Override public boolean isApplicationMenu(String menuId) { IActionBarConfigurer abc = getActionBarConfigurer(); return wbAdvisor.isApplicationMenu(abc.getWindowConfigurer(), menuId); } }
.getCoolBarManager(); IContributionItem cbItem = coolBarManager .find(IWorkbenchActionConstants.TOOLBAR_FILE);
@Override public void fillActionBars(int flags) { IActionBarConfigurer abc = getActionBarConfigurer(); wbAdvisor.fillActionBars(abc.getWindowConfigurer().getWindow(), abc, flags); }