public void stop() { try { destroy(); } catch (IllegalStateException e) { // Do nothing; we don't care that the application was already stopped // return with no error } }
public void stop() { try { destroy(); } catch (IllegalStateException e) { // Do nothing; we don't care that the application was already stopped // return with no error } }
@Override public void stop() { try { destroy(); } catch (IllegalStateException e) { // Do nothing; we don't care that the application was already stopped // return with no error } }
protected ApplicationHandle launchSpecific(Map arguments) throws Exception { // if this application is locked throw an exception. if (getLocked().booleanValue()) throw new IllegalStateException("Cannot launch a locked application."); //$NON-NLS-1$ // initialize the appHandle EclipseAppHandle appHandle = createAppHandle(arguments); try { // use the appContainer to launch the application on the main thread. appContainer.launch(appHandle); } catch (Throwable t) { // be sure to destroy the appHandle if an error occurs try { appHandle.destroy(); } catch (Throwable destroyError) { // ignore and clean up } if (t instanceof Exception) throw (Exception) t; throw (Error) t; } return appHandle; }
protected ApplicationHandle launchSpecific(Map arguments) throws Exception { // if this application is locked throw an exception. if (getLocked().booleanValue()) throw new IllegalStateException("Cannot launch a locked application."); //$NON-NLS-1$ // initialize the appHandle EclipseAppHandle appHandle = createAppHandle(arguments); try { // use the appContainer to launch the application on the main thread. appContainer.launch(appHandle); } catch (Throwable t) { // be sure to destroy the appHandle if an error occurs try { appHandle.destroy(); } catch (Throwable destroyError) { // ignore and clean up } if (t instanceof Exception) throw (Exception) t; throw (Error) t; } return appHandle; }
@Override protected ApplicationHandle launchSpecific(Map arguments) throws Exception { // if this application is locked throw an exception. if (getLocked().booleanValue()) throw new IllegalStateException("Cannot launch a locked application."); //$NON-NLS-1$ // initialize the appHandle EclipseAppHandle appHandle = createAppHandle(arguments); try { // use the appContainer to launch the application on the main thread. appContainer.launch(appHandle); } catch (Throwable t) { // be sure to destroy the appHandle if an error occurs try { appHandle.destroy(); } catch (Throwable destroyError) { // ignore and clean up } if (t instanceof Exception) throw (Exception) t; throw (Error) t; } return appHandle; }
synchronized public void removedService(ServiceReference reference, Object service) { running = false; // only wait for 5 seconds; this may timeout if forcing an application to quit takes too long // this should never timeout if the application exited normally. result = ((EclipseAppHandle) service).waitForResult(5000); EclipseAppHandle mainHandle = getMainHandle(); if (mainHandle != null) // default application has quit; now force the main threaded application to quit try { mainHandle.destroy(); } catch (Throwable t) { String message = NLS.bind(Messages.application_error_stopping, mainHandle.getInstanceId()); Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.WARNING, 0, message, 0, t, null)); } this.notify(); }
synchronized public void removedService(ServiceReference reference, Object service) { running = false; // only wait for 5 seconds; this may timeout if forcing an application to quit takes too long // this should never timeout if the application exited normally. result = ((EclipseAppHandle) service).waitForResult(5000); EclipseAppHandle mainHandle = getMainHandle(); if (mainHandle != null) // default application has quit; now force the main threaded application to quit try { mainHandle.destroy(); } catch (Throwable t) { String message = NLS.bind(Messages.application_error_stopping, mainHandle.getInstanceId()); Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.WARNING, 0, message, 0, t, null)); } this.notify(); }
@Override synchronized public void removedService(ServiceReference reference, Object service) { running = false; // only wait for 5 seconds; this may timeout if forcing an application to quit takes too long // this should never timeout if the application exited normally. result = ((EclipseAppHandle) service).waitForResult(5000); EclipseAppHandle mainHandle = getMainHandle(); if (mainHandle != null) // default application has quit; now force the main threaded application to quit try { mainHandle.destroy(); } catch (Throwable t) { String message = NLS.bind(Messages.application_error_stopping, mainHandle.getInstanceId()); Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.WARNING, 0, message, 0, t, null)); } this.notify(); }