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 * but thorws errors on osx
15 public class Application
implements IApplication
{
16 private static final Logger logger
= Logger
.getLogger(Application
.class);
19 * @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()
38 final IWorkbench workbench
= PlatformUI
.getWorkbench();
39 if (workbench
== null)
41 final Display display
= workbench
.getDisplay();
42 display
.syncExec(new Runnable() {
44 if (!display
.isDisposed())