Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java
index c1e230736..5e39a6bdb 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/DiagramAccess.java
@@ -16,9 +16,7 @@ package org.eclipse.etrice.ui.structure;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.etrice.ui.common.DiagramAccessBase;
-import org.eclipse.etrice.ui.common.commands.UpdateCommand;
-import org.eclipse.etrice.ui.common.support.AutoUpdateFeature;
-import org.eclipse.etrice.ui.structure.commands.PopulateDiagramCommand;
+import org.eclipse.etrice.ui.structure.commands.UpdateDiagramCommand;
import org.eclipse.etrice.ui.structure.editor.StructureEditor;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.features.IFeatureProvider;
@@ -46,7 +44,9 @@ public class DiagramAccess extends DiagramAccessBase {
}
protected Command getInitialCommand(StructureClass ac, Diagram diagram, TransactionalEditingDomain editingDomain) {
- return new PopulateDiagramCommand(diagram, ac, editingDomain);
+ IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram, DiagramTypeProvider.PROVIDER_ID); //$NON-NLS-1$
+ IFeatureProvider featureProvider = dtp.getFeatureProvider();
+ return new UpdateDiagramCommand(ac, diagram, editingDomain, featureProvider);
}
/* (non-Javadoc)
@@ -56,7 +56,8 @@ public class DiagramAccess extends DiagramAccessBase {
protected Command getUpdateCommand(Diagram diagram, TransactionalEditingDomain editingDomain) {
IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram, DiagramTypeProvider.PROVIDER_ID); //$NON-NLS-1$
IFeatureProvider featureProvider = dtp.getFeatureProvider();
- UpdateCommand cmd = new UpdateCommand(diagram, editingDomain, new AutoUpdateFeature(featureProvider));
+ StructureClass sc = (StructureClass) featureProvider.getBusinessObjectForPictogramElement(diagram);
+ UpdateDiagramCommand cmd = new UpdateDiagramCommand(sc, diagram, editingDomain, featureProvider);
if (cmd.updateNeeded())
return cmd;

Back to the top