1 package eu
.etaxonomy
.taxeditor
;
3 import org
.eclipse
.equinox
.app
.IApplication
;
4 import org
.eclipse
.equinox
.app
.IApplicationContext
;
5 import org
.eclipse
.swt
.widgets
.Display
;
6 import org
.eclipse
.ui
.IWorkbench
;
7 import org
.eclipse
.ui
.PlatformUI
;
10 * This class controls all aspects of the application's execution
15 public class Application
implements IApplication
{
18 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
21 public Object
start(IApplicationContext context
) {
22 Display display
= PlatformUI
.createDisplay();
24 int returnCode
= PlatformUI
.createAndRunWorkbench(display
, new ApplicationWorkbenchAdvisor());
25 if (returnCode
== PlatformUI
.RETURN_RESTART
) {
26 return IApplication
.EXIT_RESTART
;
28 return IApplication
.EXIT_OK
;
35 * @see org.eclipse.equinox.app.IApplication#stop()
41 final IWorkbench workbench
= PlatformUI
.getWorkbench();
42 if (workbench
== null)
44 final Display display
= workbench
.getDisplay();
45 display
.syncExec(new Runnable() {
47 if (!display
.isDisposed())