diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java index 6ee3940938b..d11b0f9de0f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java @@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest; import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.InteractionCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ShortCutDiagramCreateCommand;
@@ -63,13 +64,13 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCreateCommand(req));
+ return getGEFWrapper(new InteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Diagram_8016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShortCutDiagramCreateCommand(req));
+ return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
|