Bug 280076 Make model loading plugable
Today our EMF usage is structured in a way that we can only load a model from XMI and inherit from EObjectImpl. This makes it impossible to leverage other EMF-Technologies (e.g. CDO). We should think about how we can restructure our code base to have possibility to support different model-storage technologies and different EObject-Implementations.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/E4Workbench.java
/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.e4.workbench.ui.IWorkbench#run()
	 */
	public int run() {
		
		return 0;
	}
	public static IEclipseContext getServiceContext() {
		return EclipseContextFactory.getServiceContext(Activator.getDefault().getContext());
	}
	public MApplication getApplication() {
		return appModel;
	}
	public static IEclipseContext createWorkbenchContext(final IEclipseContext applicationContext,
			IExtensionRegistry registry, IExceptionHandler exceptionHandler,
			IContributionFactory contributionFactory) {
		Activator
				.trace(
						Policy.DEBUG_CONTEXTS,
						"createWorkbenchContext: initialize the workbench context with needed services", null); 
		final IEclipseContext mainContext = applicationContext.createChild("WorkbenchContext"); 
		mainContext.set(Logger.class.getName(), ContextInjectionFactory.make(WorkbenchLogger.class,
				mainContext));
		
		if (contributionFactory != null) {
			mainContext.set(IContributionFactory.class.getName(), contributionFactory);
		}
		mainContext.set(ContextManager.class.getName(), new ContextManager());