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/ResourceHandler.java
IModelReconcilingService modelReconcilingService = new ModelReconcilingService();
					ModelReconciler modelReconciler = modelReconcilingService
							.createModelReconciler();
					document.normalizeDocument();
					Collection<ModelDelta> deltas = modelReconciler.constructDeltas(resource
							.getContents().get(0), document);
					modelReconcilingService.applyDeltas(deltas);
				}
			} catch (Exception e) {
				if (logger != null) {
					logger.error(e);
				}
			}
			return resource;
		}
		long restoreLastModified = getLastStoreDatetime();
		long lastApplicationModification = getLastApplicationModification();
		boolean restore = restoreLastModified > lastApplicationModification;
		Resource resource;
		if (restore) {
			resource = loadRestoredModel();
		} else {
			resource = loadBaseModel();
		}
		
		
		MApplication appElement = (MApplication) resource.getContents().get(0);
		ModelExtensionProcessor extProcessor = new ModelExtensionProcessor(appElement);
		extProcessor.addModelExtensions();
		return resource;