Bug 265164 Consolidate all interface access under the appropriate context
At the moment the various 'Legacy<xxx>' implementations maintain discreet fields to store a variety of interface implementations (IWorkbench, IWorkbenchWindow, IPartSite...). With the new Context menchanism in place these should be placed in to the context structure at the appropriate location in the context tree and all the access methods (getService, getAdapter and a variety of 'direct' access API's like 'IWorkbecnh#getWorkingSetManager') should use the context to gain access to the API interface.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
params[i] = context.get(paramKeys[i].getName());
			}
			return targetConstructor.newInstance(params);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	public Object create(String uriString, IEclipseContext context) {
		URI uri = URI.createURI(uriString);
		Bundle bundle = getBundle(uri);
		if (bundle != null) {
			if (uri.segmentCount() > 3) {
				String prefix = uri.segment(2);
				IContributionFactorySpi factory = (IContributionFactorySpi) languages
						.get(prefix);
				StringBuffer resource = new StringBuffer(uri.segment(3));
				for (int i = 4; i < uri.segmentCount(); i++) {
					resource.append('/');
					resource.append(uri.segment(i));
				}
				return factory.create(bundle, resource.toString(), context);
			}
			try {
				Class targetClass = bundle.loadClass(uri.segment(2));
				return createObject(targetClass, context);
			} catch (ClassNotFoundException e) {
				
				e.printStackTrace();
			}
		}