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/internal/Workbench.java
toSort.add(constructor);
				}
			}
			
			
			Collections.sort(toSort, new Comparator<Constructor<?>>() {
				public int compare(Constructor<?> c1, Constructor<?> c2) {
					int l1 = c1.getParameterTypes().length;
					int l2 = c2.getParameterTypes().length;
					return l1 - l2;
				}
			});
			
			for (Constructor<?> next: toSort) {
				boolean satisfiable = true;
				Class<?>[] params = next.getParameterTypes();
				for (int i = 0; i < params.length && satisfiable; i++) {
					Class<?> clazz = params[i];
					if (!context.isSet(clazz.getName())) {
						satisfiable = false;
					}
				}
				if (satisfiable) {
					targetConstructor = next;
				}
			}
		}
		if (targetConstructor == null) {
			throw new RuntimeException(
					"could not find satisfiable constructor in class " + targetClass);