diff options
author | Camille Letavernier | 2014-10-24 11:50:17 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2014-10-24 11:50:17 +0000 |
commit | e14d28e10ff7bd6fc93041c01ed80896476967bf (patch) | |
tree | d8061076ab7f6490976fd7eeec4d54eafb719c1a /plugins | |
parent | c9b818c30fe5d74b5776dc4d44af8c1d2596321e (diff) | |
parent | ddc4b79486676c073ebb889a74e7e744c1b48719 (diff) | |
download | org.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')
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;
|