Bug 261852 [context] Separate code into API / SPI / internal
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
IExtensionRegistry registry = InternalPlatform.getDefault()
				.getRegistry();
		String extId = "org.eclipse.e4.workbench.parts";
		IConfigurationElement[] parts = registry
				.getConfigurationElementsFor(extId);
		for (int i = 0; i < parts.length; i++) {
			ContributedPart<?> part = ApplicationFactory.eINSTANCE
					.createContributedPart();
			part.setName(parts[i].getAttribute("label"));
			part.setIconURI("platform:/plugin/"
					+ parts[i].getContributor().getName() + "/"
					+ parts[i].getAttribute("icon"));
			part.setURI("platform:/plugin/"
					+ parts[i].getContributor().getName() + "/"
					+ parts[i].getAttribute("class"));
			String parentId = parts[i].getAttribute("parentId");
			Part parent = (Part) findObject(resource.getAllContents(), parentId);
			if (parent != null) {
				parent.getChildren().add(part);
			}
		}
	}
	private void installLegacyHook() {
		IExtensionRegistry registry = InternalPlatform.getDefault()
				.getRegistry();
		String extId = "org.eclipse.e4.workbench.legacy";
		IConfigurationElement[] hooks = registry
				.getConfigurationElementsFor(extId);
		ILegacyHook impl = null;
		if (hooks.length > 0) {