Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2018-08-06 10:08:40 -0400
committerCamille Letavernier2018-09-24 06:48:37 -0400
commit9d4b21535734e307582c3229d5f38c3bc4561921 (patch)
tree881b654e426c56bbed229a71a902987c2e37ed72
parent6a941cd64ac4643b9479998534f79abafa9e3d59 (diff)
downloadorg.eclipse.papyrus-9d4b21535734e307582c3229d5f38c3bc4561921.tar.gz
org.eclipse.papyrus-9d4b21535734e307582c3229d5f38c3bc4561921.tar.xz
org.eclipse.papyrus-9d4b21535734e307582c3229d5f38c3bc4561921.zip
Disable some Lifeline Policies when manipulating GeneralOrdering
- These policies should only work with Messages Change-Id: I446b062625d359e4c6b58ce9f290881be37e0138 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/LifelineChildGraphicalNodeEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java5
2 files changed, 6 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/LifelineChildGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
index c44fa7f7bcf..c4abca475ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
@@ -45,6 +45,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.command.OLDCreateGateViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers.MessageRouter;
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.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
@@ -214,7 +215,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends OLDSequenceGraphicalNo
}
}
Command command = super.getReconnectSourceCommand(request);
- if (command != null) {
+ if (command != null && request.getConnectionEditPart() instanceof AbstractMessageEditPart) {
command = OccurrenceSpecificationMoveHelper.completeReconnectConnectionCommand(command, request, getConnectableEditPart());
if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() instanceof LifelineEditPart) {
LifelineEditPart newSource = (LifelineEditPart) request.getTarget();
@@ -250,7 +251,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends OLDSequenceGraphicalNo
}
Command command = super.getReconnectTargetCommand(request);
- if (command != null) {
+ if (command != null && request.getConnectionEditPart() instanceof AbstractMessageEditPart) {
command = OccurrenceSpecificationMoveHelper.completeReconnectConnectionCommand(command, request, getConnectableEditPart());
if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() instanceof LifelineEditPart) {
command = LifelineMessageCreateHelper.reconnectMessageCreateTarget(request, command);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
index 8136e8306f5..0f4ee1de667 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
@@ -56,6 +56,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionFragmentEditPart;
@@ -429,7 +430,7 @@ public class OLDSequenceGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
}
Command command = super.getReconnectSourceCommand(request);
// //Ordering message occurrence specifications after message reconnected, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
- if (command != null && command.canExecute()) {
+ if (command != null && command.canExecute() && request.getConnectionEditPart() instanceof AbstractMessageEditPart) {
command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
}
return command;
@@ -464,7 +465,7 @@ public class OLDSequenceGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy
// }
Command command = super.getReconnectTargetCommand(request);
// Ordering message occurrence specifications after message reconnected, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
- if (command != null && command.canExecute()) {
+ if (command != null && command.canExecute() && request.getConnectionEditPart() instanceof AbstractMessageEditPart) {
command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
}
return command;

Back to the top