Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java
index c5464df2635..f64f1cdc631 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -53,10 +54,10 @@ public class CustomClassItemSemanticEditPolicyCN extends ClassItemSemanticEditPo
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -89,10 +90,10 @@ public class CustomClassItemSemanticEditPolicyCN extends ClassItemSemanticEditPo
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {

Back to the top