summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorLars Vogel2013-08-28 14:08:35 (EDT)
committer Gerrit Code Review @ Eclipse.org2013-09-04 10:02:05 (EDT)
commit9db76a062b421f3bc3540e3a9f0bc113e194f861 (patch)
tree2e512cd017f38c82414045832182d61e9ba98b87
parent802a06936f930fcd76a680b6a3ad9af7f1494e55 (diff)
downloadeclipse.platform.ui-9db76a062b421f3bc3540e3a9f0bc113e194f861.zip
eclipse.platform.ui-9db76a062b421f3bc3540e3a9f0bc113e194f861.tar.gz
eclipse.platform.ui-9db76a062b421f3bc3540e3a9f0bc113e194f861.tar.bz2
Bug 416082 - PartServiceImpl should use EModelService for model objectI20130908-2000I20130906-2000I20130905-2000I20130904-2000refs/changes/45/15945/3
creation instead of BasicFactoryImpl Change-Id: I34327e77b4e3e738398b900656906ef7d469d68c Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
index 98c4a8e..49a458d 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Lars Vogel (Lars.Vogel@gmail.com) - Bug 416082
******************************************************************************/
package org.eclipse.e4.ui.internal.workbench;
@@ -43,7 +44,6 @@ import org.eclipse.e4.ui.model.application.ui.basic.MInputPart;
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.impl.BasicFactoryImpl;
import org.eclipse.e4.ui.model.application.ui.menu.MToolBar;
import org.eclipse.e4.ui.services.EContextService;
import org.eclipse.e4.ui.services.IServiceConstants;
@@ -666,8 +666,7 @@ public class PartServiceImpl implements EPartService {
if (descriptor == null) {
return null;
}
-
- MPart part = BasicFactoryImpl.eINSTANCE.createPart();
+ MPart part = modelService.createModelElement(MPart.class);
part.setElementId(descriptor.getElementId());
part.getMenus().addAll(EcoreUtil.copyAll(descriptor.getMenus()));
if (descriptor.getToolbar() != null) {
@@ -897,18 +896,18 @@ public class PartServiceImpl implements EPartService {
MElementContainer<MUIElement> searchRoot = getContainer();
List<MUIElement> children = searchRoot.getChildren();
if (children.size() == 0) {
- MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
+ MPartStack stack = modelService.createModelElement(MPartStack.class);
searchRoot.getChildren().add(stack);
return stack;
}
MElementContainer<?> lastContainer = getLastContainer(searchRoot, children);
if (lastContainer == null) {
- MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
+ MPartStack stack = modelService.createModelElement(MPartStack.class);
searchRoot.getChildren().add(stack);
return stack;
} else if (!(lastContainer instanceof MPartStack)) {
- MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
+ MPartStack stack = modelService.createModelElement(MPartStack.class);
((List) lastContainer.getChildren()).add(stack);
return stack;
}