diff options
author | Joseph Carroll | 2013-04-02 12:41:21 +0000 |
---|---|---|
committer | Paul Webster | 2013-04-02 12:41:21 +0000 |
commit | 300a5ba65ad6e1c4ecae41992d3216536a753d15 (patch) | |
tree | a4ed97b437d568151b968a29f6a60c05f882eba0 | |
parent | ac8cd02e835171340e42b92f4bc4f2c861c9a2ce (diff) | |
download | eclipse.platform.ui-300a5ba65ad6e1c4ecae41992d3216536a753d15.tar.gz eclipse.platform.ui-300a5ba65ad6e1c4ecae41992d3216536a753d15.tar.xz eclipse.platform.ui-300a5ba65ad6e1c4ecae41992d3216536a753d15.zip |
Bug 404596 - The Display should be in the context before
PostContextCreate is called
2 files changed, 5 insertions, 11 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java index fb372819dbb..4f0947bb0a7 100644 --- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java +++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java @@ -122,12 +122,10 @@ public class E4Application implements IApplication { return display; } - /* - * (non-Javadoc) + /* (non-Javadoc) * * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app. - * IApplicationContext) - */ + * IApplicationContext) */ public Object start(IApplicationContext applicationContext) throws Exception { // set the display name before the Display is @@ -157,7 +155,6 @@ public class E4Application implements IApplication { return EXIT_OK; IEclipseContext workbenchContext = workbench.getContext(); - workbenchContext.set(Display.class, display); // Create and run the UI (if any) workbench.createAndRunUI(workbench.getApplication()); @@ -198,6 +195,7 @@ public class E4Application implements IApplication { IApplicationContext.APPLICATION_ARGS); IEclipseContext appContext = createDefaultContext(); + appContext.set(Display.class, display); appContext.set(Realm.class, SWTObservables.getRealm(display)); appContext.set(UISynchronize.class, new UISynchronize() { @@ -553,8 +551,7 @@ public class E4Application implements IApplication { } return false; } - /* - * // -data @noDefault or -data not specified, prompt and set + /* // -data @noDefault or -data not specified, prompt and set * ChooseWorkspaceData launchData = new ChooseWorkspaceData(instanceLoc * .getDefault()); * @@ -578,8 +575,7 @@ public class E4Application implements IApplication { * already in use -- force the user to choose again * MessageDialog.openError(shell, * IDEWorkbenchMessages.IDEApplication_workspaceInUseTitle, - * IDEWorkbenchMessages.IDEApplication_workspaceInUseMessage); } - */ + * IDEWorkbenchMessages.IDEApplication_workspaceInUseMessage); } */ return false; } 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 c81055dd950..b1b66a53c32 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 @@ -568,8 +568,6 @@ public final class Workbench extends EventManager implements IWorkbench { E4Application e4app = (E4Application) obj; E4Workbench e4Workbench = e4app.createE4Workbench(getApplicationContext(), display); - IEclipseContext workbenchContext = e4Workbench.getContext(); - workbenchContext.set(Display.class, display); // create the workbench instance Workbench workbench = new Workbench(display, advisor, e4Workbench |