diff options
| author | Paul Webster | 2013-09-30 16:55:59 +0000 |
|---|---|---|
| committer | Gerrit Code Review @ Eclipse.org | 2013-12-16 14:15:17 +0000 |
| commit | 7100b5419eb9ccf20faab903bded57be07355a8e (patch) | |
| tree | de68aed5778dbf04a6e8f550ce411f1d0ce368a5 | |
| parent | 5d6ed0cc907d6eea9f8ef30ca2462353cc126ed2 (diff) | |
| download | eclipse.platform.ui-7100b5419eb9ccf20faab903bded57be07355a8e.tar.gz eclipse.platform.ui-7100b5419eb9ccf20faab903bded57be07355a8e.tar.xz eclipse.platform.ui-7100b5419eb9ccf20faab903bded57be07355a8e.zip | |
Bug 413096 - 3.6.2 RCP application does not run correctly on 4.3
(workbench window is launching)
Part 1 of a fix. Honour the openWindows() returns false.
Change-Id: I6c38f6b1d8d48f684ea5e51e5b11cb9cf021dede
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java index 3c4dfb9cb57..add1d5f9b45 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java @@ -607,12 +607,16 @@ public final class Workbench extends EventManager implements IWorkbench { } // run the legacy workbench once returnCode[0] = workbench.runUI(); - // run the e4 event loop and instantiate ... well, stuff - e4Workbench.createAndRunUI(e4Workbench.getApplication()); - WorkbenchMenuService wms = (WorkbenchMenuService) e4Workbench.getContext().get( - IMenuService.class); - wms.dispose(); - e4app.saveModel(); + if (returnCode[0] == PlatformUI.RETURN_OK) { + // run the e4 event loop and instantiate ... well, stuff + e4Workbench.createAndRunUI(e4Workbench.getApplication()); + WorkbenchMenuService wms = (WorkbenchMenuService) e4Workbench.getContext() + .get(IMenuService.class); + wms.dispose(); + } + if (returnCode[0] != PlatformUI.RETURN_UNSTARTABLE) { + e4app.saveModel(); + } e4Workbench.close(); returnCode[0] = workbench.returnCode; } @@ -1600,8 +1604,8 @@ public final class Workbench extends EventManager implements IWorkbench { // TODO compat: open the windows here/instantiate the model // TODO compat: instantiate the WW around the model initializationDone = true; - // if (isClosing() || !advisor.openWindows()) { - if (isClosing()) { + if (isClosing() || !advisor.openWindows()) { + // if (isClosing()) { bail[0] = true; } @@ -2801,6 +2805,9 @@ UIEvents.Context.TOPIC_CONTEXT, // runEventLoop(handler, display); } returnCode = PlatformUI.RETURN_OK; + if (!initOK[0]) { + returnCode = PlatformUI.RETURN_UNSTARTABLE; + } } catch (final Exception e) { if (!display.isDisposed()) { handler.handleException(e); |
