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
return targetMethod.invoke(object, params);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.e4.core.services.IContributionFactory#create(java.lang.String
	 * , org.eclipse.e4.core.services.context.IEclipseContext)
	 */
	public Object create(String uriString, IEclipseContext context) {
		URI uri = URI.createURI(uriString);
		Bundle bundle = getBundle(uri);
		if (bundle != null) {
			if (uri.segmentCount() > 3) {
				String prefix = uri.segment(2);
				IContributionFactorySpi factory = (IContributionFactorySpi) languages
						.get(prefix);
				StringBuffer resource = new StringBuffer(uri.segment(3));
				for (int i = 4; i < uri.segmentCount(); i++) {
					resource.append('/');
					resource.append(uri.segment(i));
				}
				return factory.create(bundle, resource.toString(), context);
			}
			try {
				Class<?> targetClass = bundle.loadClass(uri.segment(2));
				return createObject(targetClass, context);