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
try {
			workbenchData = new File(URIUtil.toURI(instanceLocation.getURL()));
		} catch (URISyntaxException e) {
			throw new RuntimeException(e);
		}
		workbenchData = new File(workbenchData, ".metadata"); 
		workbenchData = new File(workbenchData, ".plugins"); 
		workbenchData = new File(workbenchData, "org.eclipse.e4.workbench"); 
		workbenchData = new File(workbenchData, "workbench.xmi"); 
		contributionFactory = new ReflectionContributionFactory(registry);
		resourceSet = new ResourceSetImpl();
		
		
		
		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(
				Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
		
		
		resourceSet.getPackageRegistry().put(WorkbenchPackage.eNS_URI, WorkbenchPackage.eINSTANCE);
		workbenchContext = createWorkbenchContext(applicationContext, registry, exceptionHandler,
				contributionFactory);
		workbenchContext.set(Workbench.class.getName(), this);
		workbenchContext.set(IWorkbench.class.getName(), this);
	}
	public void setWorkbenchModel(MApplication<? extends MWindow> model) {
		workbench = model;
		init();
	}