diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java index e4fcbce739a..9d9c56ffef6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java @@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
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.clazz.edit.commands.NestedClassForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForInterfaceCreateCommand;
@@ -61,37 +62,37 @@ public class InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN extend if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedClassForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3038 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3054 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3048 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3043 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3049 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
|