Bug 261852 [context] Separate code into API / SPI / internal
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
public void close() {
		appWindow.dispose();
	}
	private Bundle getBundleForName(String bundleName) {
		Bundle[] bundles = packageAdmin.getBundles(bundleName, null);
		if (bundles == null)
			return null;
		
		for (int i = 0; i < bundles.length; i++) {
			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
				return bundles[i];
			}
		}
		return null;
	}
	private Bundle getBundle(URI platformURI) {
		return getBundleForName(platformURI.segment(1));
	}
	public Object createObject(Class<?> targetClass, Context context) {
		Constructor<?> targetConstructor = null;
		Constructor<?>[] constructors = targetClass.getConstructors();
		
		if (constructors.length == 1) {
			targetConstructor = constructors[0];
		} else {
			ArrayList<Constructor<?>> toSort = new ArrayList<Constructor<?>>();
			for (int i = 0; i < constructors.length; i++) {
				Constructor<?> constructor = constructors[i];
				
				if ((constructor.getModifiers() & Modifier.PUBLIC) != 0) {