Bug 262962 Quick fix to get selection service working in the photo demo
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/SelectionServiceValue.java
static class SelectionWritableValue extends WritableValue implements
			ISelectionService {
		public Object getSelection(Class api) {
			Object value = getValue();
			if (api.isInstance(value)) {
				return value;
			}
			if (value instanceof IStructuredSelection) {
				value = ((IStructuredSelection) value).getFirstElement();
			}
			if (api.isInstance(value)) {
				return value;
			} else if (value != null) {
				return Platform.getAdapterManager().loadAdapter(value,
						api.getName());
			}
			return null;
		}
	}
	public Object compute(IEclipseContext context) {
		return new SelectionWritableValue();
	}
}