@Override public void eventLoopIdle(Display display) { advisor.eventLoopIdle(display); }
/** * Remembers the configurer and calls <code>initialize</code>. * <p> * For internal use by the workbench only. * </p> * * @param configurer * an object for configuring the workbench */ public final void internalBasicInitialize(IWorkbenchConfigurer configurer) { if (workbenchConfigurer != null) { throw new IllegalStateException(); } this.workbenchConfigurer = configurer; initialize(configurer); }
@Override public void eventLoopException(Throwable exception) { advisor.eventLoopException(exception); } });
@Override public boolean preShutdown() { Display.getCurrent().removeListener(SWT.Settings, settingsChangeListener); return super.preShutdown(); }
/** * {@inheritDoc} */ @Override public void postStartup() { super.postStartup(); // fire up the auto new version check Job checkNewVersionJob = new CheckNewVersionJob(false); checkNewVersionJob.schedule(); // register the instr. update listener InstrumentationUpdateListener updateListener = new InstrumentationUpdateListener(); InspectIT.getDefault().getInspectITConfigurationInterfaceManager().addAgentMappingsChangeListener(updateListener); InspectIT.getDefault().getInspectITConfigurationInterfaceManager().addEnvironmentChangeListener(updateListener); InspectIT.getDefault().getInspectITConfigurationInterfaceManager().addProfileChangeListener(updateListener); }
public IAdaptable getDefaultPageInput() { return wbAdvisor.getDefaultPageInput(); }
@Override public ContributionComparator getComparatorFor(String contributionType) { return advisor.getComparatorFor(contributionType); } }
@Override public void createWindowContents(Shell shell) { wbAdvisor.createWindowContents(getWindowConfigurer(), shell); }
/** * Returns the window advisor, creating a new one for this window if needed. * <p> * IMPORTANT This method is declared package private to prevent regular * plug-ins from downcasting IWorkbenchWindow to WorkbenchWindow and getting * hold of the window advisor that would allow them to tamper with the * window. The window advisor is internal to the application. * </p> */ /* package private - DO NOT CHANGE */ WorkbenchWindowAdvisor getWindowAdvisor() { if (windowAdvisor == null) { windowAdvisor = getAdvisor().createWorkbenchWindowAdvisor(getWindowConfigurer()); Assert.isNotNull(windowAdvisor); } return windowAdvisor; }
@Override public void fillActionBars(int flags) { IActionBarConfigurer abc = getActionBarConfigurer(); wbAdvisor.fillActionBars(abc.getWindowConfigurer().getWindow(), abc, flags); }
isClosing = advisor.preShutdown(); if (!force && !isClosing) { return false;
advisor.postStartup(); // May trigger a close/restart.
@Override public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window) throws WorkbenchException { return showPerspective(perspectiveId, window, advisor.getDefaultPageInput()); }
/** * {@inheritDoc} */ @Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); // save the state of the application regarding its position etc. configurer.setSaveAndRestore(true); }
@Override public void eventLoopIdle(Display display) { if (delayedEventsProcessor != null) delayedEventsProcessor.catchUp(display); super.eventLoopIdle(display); } }
/** * Returns the default workbench window page input. * * @return the default window page input or <code>null</code> if none */ public IAdaptable getDefaultPageInput() { return getAdvisor().getDefaultPageInput(); }
@Override public void handleException(Throwable t) { try { // Ignore ThreadDeath error as its normal to get this when thread dies if (t instanceof ThreadDeath) { throw (ThreadDeath) t; } // Check to avoid recursive errors exceptionCount++; if (exceptionCount > 2) { if (t instanceof RuntimeException) { throw (RuntimeException) t; } else if (t instanceof Error) { throw (Error) t; } else { throw new RuntimeException(t); } } // Let the advisor handle this now Workbench wb = Workbench.getInstance(); if (wb != null) { wb.getAdvisor().eventLoopException(t); } } finally { exceptionCount--; } } }