Bug 270989 Context refactoring
Based on discussions over the past weeks, I'm doing a refactoring of the context API. Major changes: - Renamed IComputedValue to IContextFunction - Renamed *Value to *Function - Renamed UIContextScheduler to UISchedulerStrategy - Added concept of ILookupStrategy to delegate lookup of keys that are not yet defined in a given context - Re-implemented OSGi service support using lookup strategy I also fixed a couple of NPE's I found while testing with the e4 photo demo (null realms, etc)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
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);
		globalContext = createContext(applicationContext);
		if (workbenchData != null && workbenchData.exists() && saveAndRestore) {
			createWorkbenchModel(URI.createFileURI(workbenchData
					.getAbsolutePath()), workbenchXmiURI);
		} else {
			createWorkbenchModel(null, workbenchXmiURI);
		}
	}
	private IEclipseContext createContext(IEclipseContext applicationContext) {
		final IEclipseContext mainContext = EclipseContextFactory.create(
				applicationContext, UIContextScheduler.instance);
		mainContext.set(Logger.class.getName(), new WorkbenchLogger());