1 package org
.argeo
.slc
.client
.rcp
;
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
12 public class SlcClientRcpApplication
implements IApplication
{
15 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
17 public Object
start(IApplicationContext context
) {
18 Display display
= PlatformUI
.createDisplay();
20 int returnCode
= PlatformUI
.createAndRunWorkbench(display
, new ApplicationWorkbenchAdvisor());
21 if (returnCode
== PlatformUI
.RETURN_RESTART
) {
22 return IApplication
.EXIT_RESTART
;
24 return IApplication
.EXIT_OK
;
31 * @see org.eclipse.equinox.app.IApplication#stop()
34 final IWorkbench workbench
= PlatformUI
.getWorkbench();
35 if (workbench
== null)
37 final Display display
= workbench
.getDisplay();
38 display
.syncExec(new Runnable() {
40 if (!display
.isDisposed())