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)
examples/org.eclipse.e4.demo.e4photo/src/org/eclipse/e4/demo/e4photo/Library.java
if (set != null) {
								set.getRealm().asyncExec(new Runnable() {
									public void run() {
										if (added) {
											set.add(resource);
										} else {
											set.remove(resource);
										}
									}
								});
							}
						}
					});
				} catch (CoreException e) {
					
					e.printStackTrace();
				}
			}
		}
	};
	private final IWorkspace workspace;
	static int counter;
	public Library(Composite parent, final IWorkspace workspace, final IEclipseContext outputContext) {
		final Realm realm = SWTObservables.getRealm(parent.getDisplay());
		this.workspace = workspace;
		initializeWorkspace();
		TreeViewer viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
		viewer.getTree().setData("org.eclipse.e4.ui.css.id", "library");
		
		viewer.addSelectionChangedListener(new ISelectionChangedListener(){