Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-10-24 11:50:17 +0000
committerGerrit Code Review @ Eclipse.org2014-10-24 11:50:17 +0000
commite14d28e10ff7bd6fc93041c01ed80896476967bf (patch)
treed8061076ab7f6490976fd7eeec4d54eafb719c1a /plugins
parentc9b818c30fe5d74b5776dc4d44af8c1d2596321e (diff)
parentddc4b79486676c073ebb889a74e7e744c1b48719 (diff)
downloadorg.eclipse.papyrus-e14d28e10ff7bd6fc93041c01ed80896476967bf.tar.gz
org.eclipse.papyrus-e14d28e10ff7bd6fc93041c01ed80896476967bf.tar.xz
org.eclipse.papyrus-e14d28e10ff7bd6fc93041c01ed80896476967bf.zip
Merge "Bug 317959 - creating an AssociationClass with signal."
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java
index beb42b1d233..e575e86f17f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
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;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CTemplateBindingCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CustomAssociationBranchReorientCommand;
@@ -44,6 +45,9 @@ public class CustomSignalItemSemanticEditPolicy extends SignalItemSemanticEditPo
if (UMLElementTypes.Association_4001 == req.getElementType()) {
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(), DiagramUtils.getDiagramFrom(getHost())));
+ }
if (UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
}
@@ -76,6 +80,9 @@ public class CustomSignalItemSemanticEditPolicy extends SignalItemSemanticEditPo
if (UMLElementTypes.Association_4001 == req.getElementType()) {
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(), DiagramUtils.getDiagramFrom(getHost())));
+ }
// forbid creation of association branch from it.
if (UMLElementTypes.Association_4019 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java
index 8d07465c88e..ffb28d5411d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
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;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CTemplateBindingCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CustomAssociationBranchReorientCommand;
@@ -44,6 +45,9 @@ public class CustomSignalItemSemanticEditPolicyCN extends SignalItemSemanticEdit
if (UMLElementTypes.Association_4001 == req.getElementType()) {
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(), DiagramUtils.getDiagramFrom(getHost())));
+ }
if (UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
}
@@ -76,6 +80,9 @@ public class CustomSignalItemSemanticEditPolicyCN extends SignalItemSemanticEdit
if (UMLElementTypes.Association_4001 == req.getElementType()) {
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(), DiagramUtils.getDiagramFrom(getHost())));
+ }
// forbid creation of association branch from it.
if (UMLElementTypes.Association_4019 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;

Back to the top