Bug 263544 [context] Add dependency injection context -> user object
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
}
		if (targetConstructor == null) {
			throw new RuntimeException(
					"could not find satisfiable constructor in class " + targetClass); 
		}
		Class<?>[] paramKeys = targetConstructor.getParameterTypes();
		try {
			Object[] params = new Object[paramKeys.length];
			for (int i = 0; i < params.length; i++) {
				params[i] = context.get(paramKeys[i].getName());
			}
			return targetConstructor.newInstance(params);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	public ResourceUtility getResourceUtility() {
		return resourceUtility;
	}
	public MApplication<MWorkbenchWindow> getModelElement() {
		return workbench;
	}
	public Object getService(Class<?> api) {
		if (api == ModelService.class) {
			return modelService;
		}
		if (api == ResourceUtility.class) {
			return resourceUtility;
		}
		return null;