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.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/StackModelFactory.java
ctf.setVisible(true);
			ctf.setSimple(false);
			ctf.setTabHeight(20);
			newWidget = ctf;
			final IEclipseContext folderContext = EclipseContextFactory.create(
					parentContext, UIContextScheduler.instance);
			folderContext.set(IContextConstants.DEBUG_STRING, "TabFolder"); 
			part.setContext(folderContext);
			final IEclipseContext toplevelContext = getToplevelContext(part);
			final IStylingEngine engine = (IStylingEngine) folderContext
					.get(IStylingEngine.class.getName());
			folderContext.runAndTrack(new Runnable() {
				public void run() {
					IEclipseContext currentActive = toplevelContext;
					IEclipseContext child;
					while (currentActive != folderContext
							&& (child = (IEclipseContext) currentActive
									.get("activeChild")) != null && child != currentActive) { 
						currentActive = child;
					}
					
					if (currentActive == folderContext) {
						engine.setClassname(ctf, "active"); 
					} else {
						engine.setClassname(ctf, "inactive"); 
					}
				}
			}, ""); 
		}
		return newWidget;