Bug 305586 [Model] Model tweaking round 3
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
index b0b490c..bd4bb41 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
@@ -21,7 +21,7 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.e4.core.contexts.ContextInjectionFactory;
 import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.jface.internal.provisional.action.ICoolBarManager2;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IEditorActionBarContributor;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSite.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSite.java
index fffd473..f315010 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSite.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@
 
 import java.util.ArrayList;
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.ui.IActionBars2;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java
index efee857..7e63bc7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java
@@ -21,9 +21,9 @@
 import org.eclipse.e4.core.contexts.ContextFunction;
 import org.eclipse.e4.core.contexts.IEclipseContext;
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MElementContainer;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MWindow;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.swt.widgets.Control;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java
index b32c38d..644ab6e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java
@@ -15,7 +15,7 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.e4.core.contexts.ContextInjectionFactory;
 import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchPage;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSite.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSite.java
index b3c254b..75033dd 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSite.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSite.java
@@ -11,7 +11,7 @@
 package org.eclipse.ui.internal;
 
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.internal.e4.compatibility.ActionBars;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index 3d04846..968a7b1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -70,19 +70,19 @@
 import org.eclipse.e4.core.contexts.IEclipseContext;
 import org.eclipse.e4.core.services.events.IEventBroker;
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.MBindingTable;
-import org.eclipse.e4.ui.model.application.MCommand;
-import org.eclipse.e4.ui.model.application.MElementContainer;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MPartDescriptor;
-import org.eclipse.e4.ui.model.application.MWindow;
+import org.eclipse.e4.ui.model.application.commands.MBindingTable;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
+import org.eclipse.e4.ui.model.application.commands.impl.CommandsFactoryImpl;
+import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl;
 import org.eclipse.e4.ui.services.EContextService;
 import org.eclipse.e4.ui.workbench.swt.internal.E4Application;
 import org.eclipse.e4.workbench.ui.UIEvents;
 import org.eclipse.e4.workbench.ui.internal.E4CommandProcessor;
 import org.eclipse.e4.workbench.ui.internal.E4Workbench;
-import org.eclipse.emf.common.util.EList;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
 import org.eclipse.jface.action.ActionContributionItem;
@@ -1518,11 +1518,12 @@
 					}
 				});
 		
-		MPartDescriptor descriptor = MApplicationFactory.eINSTANCE.createPartDescriptor();
+		MPartDescriptor descriptor = org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicFactoryImpl.eINSTANCE
+				.createPartDescriptor();
 		descriptor.setCloseable(true);
 		descriptor.setAllowMultiple(true);
-		descriptor.setId("org.eclipse.e4.ui.compatibility.editor"); //$NON-NLS-1$
-		descriptor.setURI(CompatibilityPart.COMPATIBILITY_EDITOR_URI);
+		descriptor.setElementId("org.eclipse.e4.ui.compatibility.editor"); //$NON-NLS-1$
+		descriptor.setContributionURI(CompatibilityPart.COMPATIBILITY_EDITOR_URI);
 		descriptor.setCategory("org.eclipse.e4.primaryDataStack"); //$NON-NLS-1$
 		application.getDescriptors().add(descriptor);
 
@@ -1560,7 +1561,7 @@
 	 *            the part's context
 	 */
 	private void setReference(MPart part, IEclipseContext context) {
-		String uri = part.getURI();
+		String uri = part.getContributionURI();
 		if (CompatibilityPart.COMPATIBILITY_VIEW_URI.equals(uri)) {
 			WorkbenchPage page = getWorkbenchPage(part);
 			ViewReference ref = page.getViewReference(part);
@@ -1580,7 +1581,7 @@
 
 	private ViewReference createViewReference(MPart part, WorkbenchPage page) {
 		WorkbenchWindow window = (WorkbenchWindow) page.getWorkbenchWindow();
-		IViewDescriptor desc = window.getWorkbench().getViewRegistry().find(part.getId());
+		IViewDescriptor desc = window.getWorkbench().getViewRegistry().find(part.getElementId());
 		ViewReference ref = new ViewReference(window.getModel().getContext(), page, part,
 				(ViewDescriptor) desc);
 		page.addViewReference(ref);
@@ -1603,7 +1604,7 @@
 	 *            the model part to create a 3.x part reference for
 	 */
 	private void createReference(MPart part) {
-		String uri = part.getURI();
+		String uri = part.getContributionURI();
 		if (CompatibilityPart.COMPATIBILITY_VIEW_URI.equals(uri)) {
 			WorkbenchPage page = getWorkbenchPage(part);
 			ViewReference ref = page.getViewReference(part);
@@ -1681,7 +1682,7 @@
 		ArrayList<MCommand> existing = new ArrayList<MCommand>(app.getCommands());
 		HashSet<String> existingIds = new HashSet<String>();
 		for (MCommand mCommand : existing) {
-			existingIds.add(mCommand.getId());
+			existingIds.add(mCommand.getElementId());
 		}
 
 		CommandService service = new CommandService(commandManager);
@@ -1718,8 +1719,8 @@
 
 			// must match definition in CommandServiceImpl
 			appContext.set(CommandServiceImpl.CMD_ID + cmdId, cmd);
-			MCommand mcmd = MApplicationFactory.eINSTANCE.createCommand();
-			mcmd.setId(cmdId);
+			MCommand mcmd = CommandsFactoryImpl.eINSTANCE.createCommand();
+			mcmd.setElementId(cmdId);
 			try {
 				mcmd.setCommandName(cmd.getName());
 			} catch (NotDefinedException e) {
@@ -1733,11 +1734,11 @@
 	}
 
 	private void defineBindingTable(String id) {
-		EList<MBindingTable> bindingTables = application.getBindingTables();
+		List<MBindingTable> bindingTables = application.getBindingTables();
 		if (contains(bindingTables, id)) {
 			return;
 		}
-		MBindingTable bt = MApplicationFactory.eINSTANCE.createBindingTable();
+		MBindingTable bt = CommandsFactoryImpl.eINSTANCE.createBindingTable();
 		bt.setBindingContextId(id);
 		bindingTables.add(bt);
 	}
@@ -1747,7 +1748,7 @@
 	 * @param id
 	 * @return true if this BT already exists
 	 */
-	private boolean contains(EList<MBindingTable> bindingTables, String id) {
+	private boolean contains(List<MBindingTable> bindingTables, String id) {
 		for (MBindingTable bt : bindingTables) {
 			if (id.equals(bt.getBindingContextId())) {
 				return true;
@@ -2125,7 +2126,7 @@
 					WorkbenchMessages.WorkbenchPage_ErrorCreatingPerspective, perspectiveId));
 		}
 
-		MWindow window = MApplicationFactory.eINSTANCE.createWindow();
+		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
 		return openWorkbenchWindow(input, descriptor, window, true);
 	}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
index d20eeff..df0e72e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
@@ -30,16 +30,16 @@
 import org.eclipse.e4.core.di.annotations.PostConstruct;
 import org.eclipse.e4.core.services.events.IEventBroker;
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.MElementContainer;
-import org.eclipse.e4.ui.model.application.MPSCElement;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MPartDescriptor;
-import org.eclipse.e4.ui.model.application.MPartStack;
-import org.eclipse.e4.ui.model.application.MPerspective;
-import org.eclipse.e4.ui.model.application.MPerspectiveStack;
-import org.eclipse.e4.ui.model.application.MUIElement;
-import org.eclipse.e4.ui.model.application.MWindow;
+import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
+import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedFactoryImpl;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement;
 import org.eclipse.e4.workbench.modeling.EModelService;
 import org.eclipse.e4.workbench.modeling.EPartService;
 import org.eclipse.e4.workbench.modeling.EPartService.PartState;
@@ -178,11 +178,11 @@
 			}
 		} else {
 			window.getContext().set(ISources.ACTIVE_PART_NAME, workbenchPart);
-			window.getContext().set(ISources.ACTIVE_PART_ID_NAME, part.getId());
+			window.getContext().set(ISources.ACTIVE_PART_ID_NAME, part.getElementId());
 
 			if (application.getContext().get(IContextConstants.ACTIVE_CHILD) == window.getContext()) {
 				application.getContext().set(ISources.ACTIVE_PART_NAME, workbenchPart);
-				application.getContext().set(ISources.ACTIVE_PART_ID_NAME, part.getId());
+				application.getContext().set(ISources.ACTIVE_PART_ID_NAME, part.getElementId());
 			}
 		}
 
@@ -540,7 +540,7 @@
 
 	MPartDescriptor findDescriptor(String id) {
 		for (MPartDescriptor descriptor : application.getDescriptors()) {
-			if (descriptor.getId().equals(id)) {
+			if (descriptor.getElementId().equals(id)) {
 				return descriptor;
 			}
 		}
@@ -554,7 +554,7 @@
 
 		Collection<MPart> parts = partService.getParts();
 		for (MPart part : parts) {
-			if (part.getId().equals(viewId) && part.getTags().contains(secondaryId)) {
+			if (part.getElementId().equals(viewId) && part.getTags().contains(secondaryId)) {
 				return part;
 			}
 		}
@@ -1605,13 +1605,13 @@
 		Collection<MPart> parts = partService.getParts();
 		for (MPart part : parts) {
 			if (part.isToBeRendered()) {
-				String uri = part.getURI();
+				String uri = part.getContributionURI();
 				if (uri.equals(CompatibilityPart.COMPATIBILITY_VIEW_URI)) {
-					createViewReferenceForPart(part, part.getId());
+					createViewReferenceForPart(part, part.getElementId());
 				} else if (uri.equals(CompatibilityPart.COMPATIBILITY_EDITOR_URI)) {
 					// TODO compat: we need that editor input back, or we have
 					// squat
-					createEditorReferenceForPart(part, null, part.getId());
+					createEditorReferenceForPart(part, null, part.getElementId());
 				}
 			}
 		}
@@ -2002,13 +2002,13 @@
 
 		MPerspectiveStack perspectives = getPerspectiveStack();
 		for (MPerspective mperspective : perspectives.getChildren()) {
-			if (mperspective.getId().equals(perspective.getId())) {
+			if (mperspective.getElementId().equals(perspective.getId())) {
 				// instantiate the perspective
 				IPerspectiveFactory factory = ((PerspectiveDescriptor) perspective).createFactory();
 				// use a new perspective since we're only interested in
 				// shortcuts here, see bug 305918
 				modelLayout = new ModeledPageLayout(application, modelService,
-						MApplicationFactory.eINSTANCE.createPerspective(), perspective, this, false);
+						AdvancedFactoryImpl.eINSTANCE.createPerspective(), perspective, this, false);
 				factory.createInitialLayout(modelLayout);
 
 				// this perspective already exists, switch to this one
@@ -2019,9 +2019,9 @@
 		}
 
 		// couldn't find the perspective, create a new one
-		MPerspective modelPerspective = MApplicationFactory.eINSTANCE.createPerspective();
+		MPerspective modelPerspective = AdvancedFactoryImpl.eINSTANCE.createPerspective();
 		// tag it with the same id
-		modelPerspective.setId(perspective.getId());
+		modelPerspective.setElementId(perspective.getId());
 
 		// instantiate the perspective
 		IPerspectiveFactory factory = ((PerspectiveDescriptor) perspective).createFactory();
@@ -2043,7 +2043,7 @@
 	 * Alters known 3.x perspective part folders into their e4 counterparts.
 	 */
 	private void tagPerspective(MPerspective perspective) {
-		String id = perspective.getId();
+		String id = perspective.getElementId();
 		if (id == null) {
 			return;
 		}
@@ -2154,13 +2154,13 @@
 	 * @return the stack of perspectives of this page's containing window
 	 */
 	private MPerspectiveStack getPerspectiveStack() {
-		for (MPSCElement child : window.getChildren()) {
+		for (MWindowElement child : window.getChildren()) {
 			if (child instanceof MPerspectiveStack) {
 				return (MPerspectiveStack) child;
 			}
 		}
 
-		MPerspectiveStack perspectiveStack = MApplicationFactory.eINSTANCE.createPerspectiveStack();
+		MPerspectiveStack perspectiveStack = AdvancedFactoryImpl.eINSTANCE.createPerspectiveStack();
 		window.getChildren().add(perspectiveStack);
 		window.setSelectedElement(perspectiveStack);
 		return perspectiveStack;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java
index 360a181..4616194 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java
@@ -18,7 +18,7 @@
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.workbench.ui.IPresentationEngine;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.JFaceResources;
@@ -333,7 +333,7 @@
 	 * @see org.eclipse.ui.IWorkbenchPartReference#getId()
 	 */
 	public String getId() {
-		return part.getId();
+		return part.getElementId();
 	}
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index c490b95..f8745b6 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,9 +37,9 @@
 import org.eclipse.e4.core.contexts.ContextInjectionFactory;
 import org.eclipse.e4.core.contexts.IEclipseContext;
 import org.eclipse.e4.core.di.annotations.PostConstruct;
-import org.eclipse.e4.ui.model.application.MElementContainer;
-import org.eclipse.e4.ui.model.application.MUIElement;
-import org.eclipse.e4.ui.model.application.MWindow;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
 import org.eclipse.e4.ui.services.EContextService;
 import org.eclipse.e4.workbench.ui.IPresentationEngine;
 import org.eclipse.e4.workbench.ui.internal.Activator;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java
index d54f216..eeb8f4d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ActionBars.java
@@ -12,7 +12,7 @@
 package org.eclipse.ui.internal.e4.compatibility;
 
 import java.util.HashMap;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
@@ -104,7 +104,7 @@
 		getStatusLineManager().update(false);
 		getMenuManager().update(false);
 		if (toolbarManager != null) {
-			System.err.println("update toolbar manager for " + part.getId()); //$NON-NLS-1$
+			System.err.println("update toolbar manager for " + part.getElementId()); //$NON-NLS-1$
 			getToolBarManager().update(false);
 		}
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityEditor.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityEditor.java
index e54177d..2f5c301 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityEditor.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityEditor.java
@@ -11,15 +11,13 @@
 
 package org.eclipse.ui.internal.e4.compatibility;
 
-import org.eclipse.e4.core.di.annotations.PreDestroy;
-
-import org.eclipse.e4.core.di.annotations.Optional;
-
 import java.util.Iterator;
 import javax.inject.Inject;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.core.di.annotations.PreDestroy;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.workbench.modeling.EPartService;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.IEditorPart;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java
index 0b998ee..e398946 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java
@@ -11,19 +11,16 @@
 
 package org.eclipse.ui.internal.e4.compatibility;
 
-import org.eclipse.e4.core.services.log.Logger;
-
-import org.eclipse.e4.core.di.annotations.PostConstruct;
-import org.eclipse.e4.core.di.annotations.PreDestroy;
-
-import org.eclipse.e4.core.di.annotations.Optional;
-
 import javax.inject.Inject;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.core.di.annotations.PostConstruct;
+import org.eclipse.e4.core.di.annotations.PreDestroy;
 import org.eclipse.e4.core.services.events.IEventBroker;
-import org.eclipse.e4.ui.model.application.MDirtyable;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.core.services.log.Logger;
+import org.eclipse.e4.ui.model.application.ui.MDirtyable;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.workbench.ui.UIEvents;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java
index 402638b..35daa66 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java
@@ -11,15 +11,14 @@
 
 package org.eclipse.ui.internal.e4.compatibility;
 
-import org.eclipse.e4.core.di.annotations.Optional;
-
+import java.util.List;
 import javax.inject.Inject;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.MMenu;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MToolBar;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolBar;
+import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuFactoryImpl;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.swt.widgets.Composite;
@@ -86,9 +85,9 @@
 		if (mm.getItems().length > 0) {
 			Control partCtrl = (Control) part.getWidget();
 			partCtrl.setData("legacyMM", mm); //$NON-NLS-1$
-			EList<MMenu> menus = part.getMenus();
+			List<MMenu> menus = part.getMenus();
 			if (menus.size() == 0) {
-				MMenu menu = MApplicationFactory.eINSTANCE.createMenu();
+				MMenu menu = MenuFactoryImpl.eINSTANCE.createMenu();
 
 				// HACK!! Identifies this to the TB renderer
 				menu.getTags().add("LegacyMenu"); //$NON-NLS-1$
@@ -102,7 +101,7 @@
 		if (tbm.getItems().length > 0) {
 			MToolBar toolbar = part.getToolbar();
 			if (toolbar == null) {
-				toolbar = MApplicationFactory.eINSTANCE.createToolBar();
+				toolbar = MenuFactoryImpl.eINSTANCE.createToolBar();
 
 				// HACK!! Identifies this to the TB renderer
 				toolbar.getTags().add("LegacyTB"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledFolderLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledFolderLayout.java
index 9e1a315..1cb736c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledFolderLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledFolderLayout.java
@@ -12,8 +12,8 @@
 package org.eclipse.ui.internal.e4.compatibility;
 
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
 import org.eclipse.ui.IFolderLayout;
 
 public class ModeledFolderLayout extends ModeledPlaceholderFolderLayout
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
index 7b66812..9fb8457 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
@@ -14,17 +14,16 @@
 import java.util.ArrayList;
 import java.util.List;
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.MElementContainer;
-import org.eclipse.e4.ui.model.application.MPSCElement;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MPartDescriptor;
-import org.eclipse.e4.ui.model.application.MPartSashContainer;
-import org.eclipse.e4.ui.model.application.MPartStack;
-import org.eclipse.e4.ui.model.application.MPerspective;
-import org.eclipse.e4.ui.model.application.MUIElement;
+import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
+import org.eclipse.e4.ui.model.application.ui.MElementContainer;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl;
 import org.eclipse.e4.workbench.modeling.EModelService;
-import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.swt.SWT;
@@ -65,14 +64,14 @@
 
 		this.createReferences = createReferences;
 
-		MPartSashContainer esc = MApplicationFactory.eINSTANCE.createPartSashContainer();
-		editorStack = MApplicationFactory.eINSTANCE.createPartStack();
+		MPartSashContainer esc = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
+		editorStack = BasicFactoryImpl.eINSTANCE.createPartStack();
 		// temporary HACK for bug 303982
 		editorStack.getTags().add("newtablook"); //$NON-NLS-1$
 		editorStack.getTags().add("org.eclipse.e4.primaryDataStack"); //$NON-NLS-1$
-		editorStack.setId("org.eclipse.e4.primaryDataStack"); //$NON-NLS-1$
+		editorStack.setElementId("org.eclipse.e4.primaryDataStack"); //$NON-NLS-1$
 		esc.getChildren().add(editorStack);
-		esc.setId(getEditorArea());
+		esc.setElementId(getEditorArea());
 
 		// editorArea.setName("Editor Area");
 
@@ -228,7 +227,7 @@
 	public static MPart createViewModel(MApplication application, String id, boolean visible,
 			WorkbenchPage page, boolean createReferences) {
 		for (MPartDescriptor descriptor : application.getDescriptors()) {
-			if (descriptor.getId().equals(id)) {
+			if (descriptor.getElementId().equals(id)) {
 				MPart part = (MPart) EcoreUtil.copy((EObject) descriptor);
 				part.setToBeRendered(visible);
 				// there should only be view references for views that are
@@ -245,10 +244,10 @@
 	}
 
 	public static MPartStack createStack(String id, boolean visible) {
-		MPartStack newStack = MApplicationFactory.eINSTANCE.createPartStack();
+		MPartStack newStack = BasicFactoryImpl.eINSTANCE.createPartStack();
 		// temporary HACK for bug 303982
 		newStack.getTags().add("newtablook"); //$NON-NLS-1$
-		newStack.setId(id);
+		newStack.setElementId(id);
 		newStack.setVisible(visible);
 		return newStack;
 	}
@@ -345,37 +344,37 @@
 
 		MElementContainer<MUIElement> relParent = relTo.getParent();
 		if (relParent != null) {
-			EList<MUIElement> children = relParent.getChildren();
+			List<MUIElement> children = relParent.getChildren();
 			int index = children.indexOf(relTo);
-			MPartSashContainer psc = MApplicationFactory.eINSTANCE.createPartSashContainer();
+			MPartSashContainer psc = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
 			psc.setContainerData(relTo.getContainerData());
 			relParent.getChildren().add(index + 1, psc);
 
 			switch (swtSide) {
 			case SWT.LEFT:
-				psc.getChildren().add((MPSCElement) toInsert);
-				psc.getChildren().add((MPSCElement) relTo);
+				psc.getChildren().add((MPartSashContainerElement) toInsert);
+				psc.getChildren().add((MPartSashContainerElement) relTo);
 				toInsert.setContainerData("" + ratio); //$NON-NLS-1$
 				relTo.setContainerData("" + (100 - ratio)); //$NON-NLS-1$
 				psc.setHorizontal(true);
 				break;
 			case SWT.RIGHT:
-				psc.getChildren().add((MPSCElement) relTo);
-				psc.getChildren().add((MPSCElement) toInsert);
+				psc.getChildren().add((MPartSashContainerElement) relTo);
+				psc.getChildren().add((MPartSashContainerElement) toInsert);
 				relTo.setContainerData("" + ratio); //$NON-NLS-1$
 				toInsert.setContainerData("" + (100 - ratio)); //$NON-NLS-1$
 				psc.setHorizontal(true);
 				break;
 			case SWT.TOP:
-				psc.getChildren().add((MPSCElement) toInsert);
-				psc.getChildren().add((MPSCElement) relTo);
+				psc.getChildren().add((MPartSashContainerElement) toInsert);
+				psc.getChildren().add((MPartSashContainerElement) relTo);
 				toInsert.setContainerData("" + ratio); //$NON-NLS-1$
 				relTo.setContainerData("" + (100 - ratio)); //$NON-NLS-1$
 				psc.setHorizontal(false);
 				break;
 			case SWT.BOTTOM:
-				psc.getChildren().add((MPSCElement) relTo);
-				psc.getChildren().add((MPSCElement) toInsert);
+				psc.getChildren().add((MPartSashContainerElement) relTo);
+				psc.getChildren().add((MPartSashContainerElement) toInsert);
 				relTo.setContainerData("" + ratio); //$NON-NLS-1$
 				toInsert.setContainerData("" + (100 - ratio)); //$NON-NLS-1$
 				psc.setHorizontal(false);
@@ -390,14 +389,14 @@
 		// Create the new sash if we're going to need one
 		MPartSashContainer newSash = null;
 		if ((swtSide == SWT.TOP || swtSide == SWT.BOTTOM) && !isStack) {
-			newSash = MApplicationFactory.eINSTANCE.createPartSashContainer();
-			String label = "Vertical Sash[" + toInsert.getId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
-			newSash.setId(label);
+			newSash = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
+			String label = "Vertical Sash[" + toInsert.getElementId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+			newSash.setElementId(label);
 			newSash.setHorizontal(false);
 		} else if ((swtSide == SWT.LEFT || swtSide == SWT.RIGHT) && !isStack) {
-			newSash = MApplicationFactory.eINSTANCE.createPartSashContainer();
-			String label = "Horizontal Sash[" + toInsert.getId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
-			newSash.setId(label);
+			newSash = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
+			String label = "Horizontal Sash[" + toInsert.getElementId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+			newSash.setElementId(label);
 			newSash.setHorizontal(true);
 		}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPlaceholderFolderLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPlaceholderFolderLayout.java
index 3be6bcc..a463a6f 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPlaceholderFolderLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPlaceholderFolderLayout.java
@@ -12,8 +12,8 @@
 package org.eclipse.ui.internal.e4.compatibility;
 
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.ui.model.application.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
 import org.eclipse.ui.IPlaceholderFolderLayout;
 
 public class ModeledPlaceholderFolderLayout implements IPlaceholderFolderLayout {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledViewLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledViewLayout.java
index 3c25795..f0ae9a4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledViewLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledViewLayout.java
@@ -11,7 +11,7 @@
 
 package org.eclipse.ui.internal.e4.compatibility;
 
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.ui.IViewLayout;
 
 public class ModeledViewLayout implements IViewLayout {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/SelectionService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/SelectionService.java
index a16be4f..56d45bb 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/SelectionService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/SelectionService.java
@@ -11,10 +11,6 @@
 
 package org.eclipse.ui.internal.e4.compatibility;
 
-import org.eclipse.e4.core.contexts.IEclipseContext;
-
-import org.eclipse.e4.core.di.annotations.Optional;
-
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -22,7 +18,9 @@
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.e4.workbench.modeling.ESelectionService;
 import org.eclipse.jface.viewers.IPostSelectionProvider;
@@ -61,7 +59,7 @@
 			Object client = part.getObject();
 			if (client instanceof CompatibilityPart) {
 				IWorkbenchPart workbenchPart = ((CompatibilityPart) client).getPart();
-				notifyListeners(part.getId(), workbenchPart, (ISelection) selection);
+				notifyListeners(part.getElementId(), workbenchPart, (ISelection) selection);
 			}
 		}
 	};
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerService.java
index 6798a1f..a5893ec 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerService.java
@@ -11,9 +11,6 @@
 
 package org.eclipse.ui.internal.handlers;
 
-import org.eclipse.e4.core.contexts.EclipseContextFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-
 import java.util.Collection;
 import java.util.Collections;
 import org.eclipse.core.commands.Command;
@@ -34,7 +31,9 @@
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.e4.core.commands.ECommandService;
 import org.eclipse.e4.core.commands.EHandlerService;
-import org.eclipse.e4.ui.model.application.MContext;
+import org.eclipse.e4.core.contexts.EclipseContextFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.model.application.ui.MContext;
 import org.eclipse.e4.ui.workbench.swt.internal.AbstractPartRenderer;
 import org.eclipse.e4.workbench.ui.internal.Activator;
 import org.eclipse.e4.workbench.ui.internal.Policy;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java
index caeebbe..995b292 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MPartDescriptor;
+import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
 import org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtiltities;
 import org.eclipse.e4.workbench.ui.IResourceUtiltities;
 import org.eclipse.emf.common.util.URI;
@@ -56,7 +56,7 @@
 	public IViewPart createView() throws CoreException {
 		if (element == null) {
 			throw new CoreException(new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH,
-					"Unable to create an e4 view of id " + descriptor.getId())); //$NON-NLS-1$
+					"Unable to create an e4 view of id " + descriptor.getElementId())); //$NON-NLS-1$
 		}
 		return (IViewPart) element.createExecutableExtension("class"); //$NON-NLS-1$
 	}
@@ -85,7 +85,7 @@
 	 * @see org.eclipse.ui.views.IViewDescriptor#getId()
 	 */
 	public String getId() {
-		return descriptor.getId();
+		return descriptor.getElementId();
 	}
 
 	/*
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
index 10613ac..3afe7c8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,17 +11,16 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.registry;
 
-import org.eclipse.e4.core.di.annotations.PostConstruct;
-
 import java.util.HashMap;
 import java.util.Map;
 import javax.inject.Inject;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.e4.core.di.annotations.PostConstruct;
 import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.MPartDescriptor;
+import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
+import org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicFactoryImpl;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.internal.e4.compatibility.CompatibilityPart;
 import org.eclipse.ui.internal.e4.compatibility.E4Util;
@@ -43,8 +42,9 @@
 	@PostConstruct
 	void postConstruct() {
 		for (MPartDescriptor descriptor : application.getDescriptors()) {
-			if (!descriptor.getURI().equals(CompatibilityPart.COMPATIBILITY_EDITOR_URI)) {
-				descriptors.put(descriptor.getId(), new ViewDescriptor(application, descriptor,
+			if (!descriptor.getContributionURI().equals(CompatibilityPart.COMPATIBILITY_EDITOR_URI)) {
+				descriptors.put(descriptor.getElementId(), new ViewDescriptor(application,
+						descriptor,
 						null));
 			}
 		}
@@ -52,10 +52,10 @@
 		IExtensionPoint point = extensionRegistry.getExtensionPoint("org.eclipse.ui.views"); //$NON-NLS-1$
 		for (IConfigurationElement element : point.getConfigurationElements()) {
 			if (element.getName().equals(IWorkbenchRegistryConstants.TAG_VIEW)) {
-				MPartDescriptor descriptor = MApplicationFactory.eINSTANCE.createPartDescriptor();
+				MPartDescriptor descriptor = BasicFactoryImpl.eINSTANCE.createPartDescriptor();
 				descriptor.setLabel(element.getAttribute(IWorkbenchRegistryConstants.ATT_NAME));
 				String id = element.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
-				descriptor.setId(id);
+				descriptor.setElementId(id);
 				if (id.equals(IPageLayout.ID_RES_NAV) || id.equals(IPageLayout.ID_PROJECT_EXPLORER)) {
 					descriptor.setCategory("org.eclipse.e4.primaryNavigationStack"); //$NON-NLS-1$
 				} else if (id.equals(IPageLayout.ID_OUTLINE)) {
@@ -68,7 +68,7 @@
 				descriptor.setAllowMultiple(Boolean.parseBoolean(element
 						.getAttribute(IWorkbenchRegistryConstants.ATT_ALLOW_MULTIPLE)));
 				descriptor
-						.setURI("platform:/plugin/org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView"); //$NON-NLS-1$
+						.setContributionURI("platform:/plugin/org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView"); //$NON-NLS-1$
 
 				String iconURI = element.getAttribute(IWorkbenchRegistryConstants.ATT_ICON);
 				if (iconURI != null) {
@@ -85,7 +85,8 @@
 				}
 
 				application.getDescriptors().add(descriptor);
-				descriptors.put(descriptor.getId(), new ViewDescriptor(application, descriptor,
+				descriptors.put(descriptor.getElementId(), new ViewDescriptor(application,
+						descriptor,
 						element));
 			}
 		}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java
index c4d50aa..3b58154 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@
 import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.e4.ui.model.application.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.jface.dialogs.IPageChangeProvider;
 import org.eclipse.jface.dialogs.IPageChangedListener;
 import org.eclipse.jface.dialogs.PageChangedEvent;
diff --git a/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
index a29aab1..51880ac 100644
--- a/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
@@ -108,6 +108,17 @@
  org.eclipse.e4.ui.bindings,
  org.eclipse.e4.ui.bindings.keys,
  org.eclipse.e4.ui.model.application,
+ org.eclipse.e4.ui.model.application.commands,
+ org.eclipse.e4.ui.model.application.commands.impl,
+ org.eclipse.e4.ui.model.application.descriptor.basic,
+ org.eclipse.e4.ui.model.application.descriptor.basic.impl,
+ org.eclipse.e4.ui.model.application.ui,
+ org.eclipse.e4.ui.model.application.ui.advanced,
+ org.eclipse.e4.ui.model.application.ui.advanced.impl,
+ org.eclipse.e4.ui.model.application.ui.basic,
+ org.eclipse.e4.ui.model.application.ui.basic.impl,
+ org.eclipse.e4.ui.model.application.ui.menu,
+ org.eclipse.e4.ui.model.application.ui.menu.impl,
  org.eclipse.e4.ui.services,
  org.eclipse.e4.ui.workbench.swt.internal,
  org.eclipse.e4.workbench.modeling,