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/WBPartFactory.java
super.hookControllerLogic(me);
		Widget widget = (Widget) me.getWidget();
		if (widget instanceof Shell && me instanceof MWindow) {
			final Shell shell = (Shell) widget;
			final MWindow w = (MWindow) me;
			shell.addControlListener(new ControlListener() {
				public void controlResized(ControlEvent e) {
					w.setWidth(shell.getSize().x);
					w.setHeight(shell.getSize().y);
				}
				public void controlMoved(ControlEvent e) {
					w.setX(shell.getLocation().x);
					w.setY(shell.getLocation().y);
				}
			});
		}
		
		IObservableValue emfTextObs = EMFObservables.observeValue(me,
				ApplicationPackage.Literals.MITEM__NAME);
		if (widget instanceof Control && !(widget instanceof Composite)) {
			ISWTObservableValue uiTextObs = SWTObservables
					.observeText((Control) widget);
			dbc.bindValue(uiTextObs, emfTextObs, null, null);
		} else if (widget instanceof org.eclipse.swt.widgets.Item) {
			ISWTObservableValue uiTextObs = SWTObservables.observeText(widget);
			dbc.bindValue(uiTextObs, emfTextObs, null, null);
		}
		
		IObservableValue emfTTipObs = EMFObservables.observeValue(me,
				ApplicationPackage.Literals.MITEM__TOOLTIP);