/** * Creates the contents of the window. * <p> * The default implementation adds a menu bar, a cool bar, a status line, a * perspective bar, and a fast view bar. The visibility of these controls * can be configured using the <code>setShow*</code> methods on * <code>IWorkbenchWindowConfigurer</code>. * </p> * <p> * Subclasses may override to define custom window contents and layout, but * must call <code>IWorkbenchWindowConfigurer.createPageComposite</code>. * </p> * * @param shell * the window's shell * @see IWorkbenchWindowConfigurer#createMenuBar * @see IWorkbenchWindowConfigurer#createCoolBarControl * @see IWorkbenchWindowConfigurer#createStatusLineControl * @see IWorkbenchWindowConfigurer#createPageComposite * @deprecated This method is no longer used. Applications now define * workbench window contents in their application model. */ @Deprecated public void createWindowContents(Shell shell) { ((WorkbenchWindowConfigurer) getWindowConfigurer()).createDefaultContents(shell); }
void fireWindowOpened() { // notify the advisor getWindowAdvisor().postWindowOpen(); }
@Override public void runWithException() throws Throwable { getWindowAdvisor().postWindowRestore(); } });
getWindowAdvisor().postWindowCreate(); getWindowAdvisor().openIntro();
@Override public void dispose() { if (propertyChangeListener != null) { IDEWorkbenchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(propertyChangeListener); propertyChangeListener = null; } if (openPerspectiveAction!=null) { openPerspectiveAction.dispose(); openPerspectiveAction = null; } super.dispose(); }
/** * Tries to open the intro, if one exists and otherwise will open the legacy * Welcome pages. * * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#openIntro() */ @Override public void openIntro() { if (editorsAndIntrosOpened) { return; } editorsAndIntrosOpened = true; // don't try to open the welcome editors if there is an intro if (wbAdvisor.hasIntro()) { super.openIntro(); } else { openWelcomeEditors(getWindowConfigurer().getWindow()); // save any preferences changes caused by the above actions IDEWorkbenchPlugin.getDefault().savePluginPreferences(); } }
/** * Notifies interested parties (namely the advisor) that the window is about * to be opened. * * @since 3.1 */ private void fireWindowOpening() { // let the application do further configuration getWindowAdvisor().preWindowOpen(); }
@Override public boolean close(MWindow window) { return getWindowAdvisor().preWindowShellClose() && WorkbenchWindow.this.close(); } });
/** * Notifies interested parties (namely the advisor and the window listeners) * that the window has been closed. * * @since 3.1 */ private void fireWindowClosed() { // let the application do further deconfiguration getWindowAdvisor().postWindowClose(); getWorkbenchImpl().fireWindowClosed(this); }
/** * Returns the action bar advisor, creating a new one for this window if * needed. * <p> * IMPORTANT This method is declared private to prevent regular plug-ins * from downcasting IWorkbenchWindow to WorkbenchWindow and getting hold of * the action bar advisor that would allow them to tamper with the window's * action bars. The action bar advisor is internal to the application. * </p> */ private/* private - DO NOT CHANGE */ ActionBarAdvisor getActionBarAdvisor() { if (actionBarAdvisor == null) { actionBarAdvisor = getWindowAdvisor().createActionBarAdvisor( getWindowConfigurer().getActionBarConfigurer()); Assert.isNotNull(actionBarAdvisor); } return actionBarAdvisor; }
getWindowAdvisor().dispose();
@Override public void run() throws Exception { getWindowAdvisor().postWindowRestore(); } });
IWorkbenchConfigurer wbConfig = getWindowConfigurer().getWorkbenchConfigurer(); final String key = "introOpened"; //$NON-NLS-1$ Boolean introOpened = (Boolean) wbConfig.getData(key); .showIntro(getWindowConfigurer().getWindow(), false);