@Override public void fillActionBars(int flags) { super.fillActionBars(flags); updateBuildActions(true); if ((flags & FILL_PROXY) == 0) { hookListeners(); } }
/** * Creates a new action bar advisor to configure the action bars of the window * via the given action bar configurer. * The default implementation returns a new instance of {@link ActionBarAdvisor}. * * @param configurer the action bar configurer for the window * @return the action bar advisor for the window */ public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { return new ActionBarAdvisor(configurer); }
/** * Disposes all actions added via <code>register(IAction)</code> * using <code>disposeAction(IAction)</code>. */ protected void disposeActions() { for (Iterator i = actions.values().iterator(); i.hasNext();) { IAction action = (IAction) i.next(); disposeAction(action); } actions.clear(); }
makeActions(actionBarConfigurer.getWindowConfigurer().getWindow()); fillMenuBar(actionBarConfigurer.getMenuManager()); menuCreated = true; fillCoolBar(actionBarConfigurer.getCoolBarManager()); fillStatusLine(actionBarConfigurer.getStatusLineManager());
getActionBarAdvisor().dispose(); getWindowAdvisor().dispose();
/** * @see IWorkbenchWindow */ @Override public boolean isApplicationMenu(String menuID) { // delegate this question to the action bar advisor return getActionBarAdvisor().isApplicationMenu(menuID); }
/** * 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(); }
String definitionId = action.getActionDefinitionId(); if (definitionId != null) { IActionCommandMappingService mapping = getActionBarConfigurer() .getWindowConfigurer().getWindow() .getService(IActionCommandMappingService.class); getActionBarConfigurer().registerGlobalAction(action);
fullscreenItem = null; arrangeWindowsItem = null; super.dispose();
/** * Fills the window's real action bars. * * @param flags * indicate which bars to fill */ public void fillActionBars(int flags) { Workbench workbench = getWorkbenchImpl(); workbench.largeUpdateStart(); try { getActionBarAdvisor().fillActionBars(flags); } finally { workbench.largeUpdateEnd(); } }
/** * Fills the window's proxy action bars. * * @param proxyBars * the proxy configurer * @param flags * indicate which bars to fill */ public void fillActionBars(IActionBarConfigurer2 proxyBars, int flags) { Assert.isNotNull(proxyBars); WorkbenchWindowConfigurer.WindowActionBarConfigurer wab = (WorkbenchWindowConfigurer.WindowActionBarConfigurer) getWindowConfigurer() .getActionBarConfigurer(); wab.setProxy(proxyBars); try { getActionBarAdvisor().fillActionBars(flags | ActionBarAdvisor.FILL_PROXY); } finally { wab.setProxy(null); } }