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/ReflectionContributionFactory.java
private IExtensionRegistry registry;
	private Map<String, Object> languages;
	/**
	 * Create a reflection factory.
	 * 
	 * @param registry
	 *            to read languages.
	 */
	public ReflectionContributionFactory(IExtensionRegistry registry) {
		this.registry = registry;
		processLanguages();
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.e4.core.services.IContributionFactory#call(java.lang.Object,
	 * java.lang.String, java.lang.String,
	 * org.eclipse.e4.core.services.context.IEclipseContext, java.lang.Object)
	 */
	public Object call(Object object, String uriString, String methodName,
			IEclipseContext context, Object defaultValue) {
		URI uri = URI.createURI(uriString);
		if (uri.segmentCount() > 3) {
			String prefix = uri.segment(2);
			IContributionFactorySpi factory = (IContributionFactorySpi) languages
					.get(prefix);
			return factory.call(object, methodName, context, defaultValue);
		}