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.swt/src/org/eclipse/e4/ui/workbench/swt/internal/E4Application.java
applicationContext);
		if (presentationURI == null) {
			presentationURI = PartRenderingEngine.engineURI;
		}
		appContext.set(E4Workbench.PRESENTATION_URI_ARG, presentationURI);
		
		
		E4Workbench workbench = new E4Workbench(appModel, appContext);
		return workbench;
	}
	private MApplication loadApplicationModel(IApplicationContext appContext,
			IEclipseContext eclipseContext) {
		MApplication theApp = null;
		Location instanceLocation = Activator.getDefault()
				.getInstanceLocation();
		String appModelPath = getArgValue(E4Workbench.XMI_URI_ARG, appContext);
		Assert.isNotNull(appModelPath, E4Workbench.XMI_URI_ARG
				+ " argument missing"); 
		final URI initialWorkbenchDefinitionInstance = URI
				.createPlatformPluginURI(appModelPath, true);
		boolean saveAndRestore = true;
		handler = new ResourceHandler(instanceLocation,
				initialWorkbenchDefinitionInstance, saveAndRestore,
				(Logger) eclipseContext.get(Logger.class.getName()));
		Resource resource = handler.loadMostRecentModel();
		theApp = (MApplication) resource.getContents().get(0);
		return theApp;
	}
	private String getArgValue(String argName, IApplicationContext appContext) {