Bug 286678 UI model and propagation of context values: containers with variables
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
Resource resource = new ResourceSetImpl().getResource(defaultModelPath, true);
		MApplication<MWindow> app = (MApplication<MWindow>) resource.getContents().get(0);
		final EList<MWindow> windows = app.getWindows();
		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++) {
			MContributedPart<?> part = ApplicationFactory.eINSTANCE.createMContributedPart();
			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"); 
			MPart parent = (MPart) findObject(resource.getAllContents(), parentId);
			if (parent != null) {
				parent.getChildren().add(part);
			}
		}
	}
	private EObject findObject(TreeIterator<EObject> it, String id) {
		while (it.hasNext()) {