Bug 290964 Factor out model loading from Workbench so that it is plugable
We want to support different workbench restoreing possibilities and for this we need to delegate the loading to an external instance
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
((Notifier) workbench).eAdapters().add(new UIModelEventPublisher(workbench.getContext()));
		return workbench;
	}
	private MApplication loadDefaultModel(URI defaultModelPath) {
		Resource resource = new ResourceSetImpl().getResource(defaultModelPath, true);
		MApplication app = (MApplication) resource.getContents().get(0);
		final EList<MWindow> windows = app.getChildren();
		for (MWindow window : windows) {
			processPartContributions(resource, window);
		}
		return app;
	}
	private void processPartContributions(Resource resource, MWindow mWindow) {
		IExtensionRegistry registry = RegistryFactory.getRegistry();
		String extId = "org.eclipse.e4.workbench.parts"; 
		IConfigurationElement[] parts = registry.getConfigurationElementsFor(extId);
		for (int i = 0; i < parts.length; i++) {
			MPart part = MApplicationFactory.eINSTANCE.createPart();
			part.setName(parts[i].getAttribute("label")); 
			part.setIconURI("platform:/plugin/" 
					+ parts[i].getContributor().getName() + "/" 
					+ parts[i].getAttribute("icon")); 
			part.setURI("platform:/plugin/" 
					+ parts[i].getContributor().getName() + "/" 
					+ parts[i].getAttribute("class")); 
			String parentId = parts[i].getAttribute("parentId"); 
			Object parent = findObject(resource.getAllContents(), parentId);
			if (parent instanceof MElementContainer<?>) {
				((MElementContainer<MPSCElement>) parent).getChildren().add(part);