Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2018-09-20 06:17:38 -0400
committerCamille Letavernier2018-09-24 06:48:56 -0400
commit4d0138d52a586f07fb22cd3803d860e9b66c3ba6 (patch)
tree3bbb31356f93648c7eb480b990cfe726678393d2
parentc222452ef1ae32f57522f9475db45af40683b0fc (diff)
downloadorg.eclipse.papyrus-4d0138d52a586f07fb22cd3803d860e9b66c3ba6.tar.gz
org.eclipse.papyrus-4d0138d52a586f07fb22cd3803d860e9b66c3ba6.tar.xz
org.eclipse.papyrus-4d0138d52a586f07fb22cd3803d860e9b66c3ba6.zip
Bug 539277: [Sequence Diagram] Support reconnect on Duration Link edit
parts https://bugs.eclipse.org/bugs/show_bug.cgi?id=539277 - Fix a (merge) conflict: two different providers were installing two different semantic edit policies on ExecSpecs, which broke the reconnection of DurationLinks/GeneralOrderings on ExecSpecs Change-Id: I7082972d76b031c60fc0e59420a3cd61904a897b Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExecutionSpecificationSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/SemanticOccurrenceEditPolicyProvider.java6
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExecutionSpecificationSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExecutionSpecificationSemanticEditPolicy.java
index 7cdcca025c1..c25063c0263 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExecutionSpecificationSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExecutionSpecificationSemanticEditPolicy.java
@@ -18,7 +18,6 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.DurationLinkUtil;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
@@ -29,7 +28,7 @@ import org.eclipse.uml2.uml.TimeConstraint;
/**
* Specific policy to set the contrained element for {@link TimeConstraint}.
*/
-public class CustomExecutionSpecificationSemanticEditPolicy extends DefaultSemanticEditPolicy {
+public class CustomExecutionSpecificationSemanticEditPolicy extends OccurenceSemanticEditPolicy {
@Override
protected Command getCreateCommand(CreateElementRequest req) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/SemanticOccurrenceEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/SemanticOccurrenceEditPolicyProvider.java
index 6ae12c016d7..ee8a4a6a090 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/SemanticOccurrenceEditPolicyProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/SemanticOccurrenceEditPolicyProvider.java
@@ -19,7 +19,6 @@ import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OccurenceSemanticEditPolicy;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
@@ -47,7 +46,10 @@ public class SemanticOccurrenceEditPolicyProvider extends AbstractProvider imple
CreateEditPoliciesOperation op = (CreateEditPoliciesOperation) operation;
EditPart editPart = op.getEditPart();
- return editPart instanceof AbstractExecutionSpecificationEditPart || editPart instanceof AbstractMessageEditPart;
+
+ // Only install this on Message EditParts. We also need that policy for ExecSpecs,
+ // but CustomExecutionSpecificationEditPolicyProvider already takes care of that
+ return editPart instanceof AbstractMessageEditPart;
}
@Override

Back to the top