1 package eu
.etaxonomy
.taxeditor
;
3 import org
.apache
.log4j
.Logger
;
4 import org
.eclipse
.equinox
.app
.IApplication
;
5 import org
.eclipse
.equinox
.app
.IApplicationContext
;
6 import org
.eclipse
.swt
.widgets
.Display
;
7 import org
.eclipse
.ui
.IWorkbench
;
8 import org
.eclipse
.ui
.PlatformUI
;
11 * This class controls all aspects of the application's execution
13 public class Application
implements IApplication
{
14 private static final Logger logger
= Logger
.getLogger(Application
.class);
17 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
19 public Object
start(IApplicationContext context
) {
20 Display display
= PlatformUI
.createDisplay();
22 int returnCode
= PlatformUI
.createAndRunWorkbench(display
, new ApplicationWorkbenchAdvisor());
23 if (returnCode
== PlatformUI
.RETURN_RESTART
) {
24 return IApplication
.EXIT_RESTART
;
26 return IApplication
.EXIT_OK
;
33 * @see org.eclipse.equinox.app.IApplication#stop()
36 final IWorkbench workbench
= PlatformUI
.getWorkbench();
37 if (workbench
== null)
39 final Display display
= workbench
.getDisplay();
40 display
.syncExec(new Runnable() {
42 if (!display
.isDisposed())