Project: Eclipse_Platform_UI
Bug 398309 Include getWorkbenchContext() in IWorkbench API
Reported: 2013-01-16 11:17:11 | Status: verified fixed

One of the first things I did was move all of the constants from E4Workbench into IWorkbench. I also added constants for the default model file extension and the default name assigned to the workbench context. Since the application model and workbench context are both closely associated with the workbench, I added getter's for each. These are not new methods, they are just not provided for in the IWorkbench. Note: Installing the proposed patch will break the runtime! -> the current E4Workbench method to get the context is getContext(), in an effort to be more clear about which type of context (IApplicationContext v. IEclipseContext) and from where I propose adding a new method called getWorkbenchContext. I see this as the first step to moving towards an environment where the workbench creates its own default context and provides that context to the application as opposed to the current paradigm. I also added comments to all constants in an effort to make the patch more "production ready". Not sure if all my comments are accurate so someone might have to double check. JD

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ResourceHandler.java bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/IWorkbench.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java