From 11b1eacce8fa48146d879b459747c7c16fda963b Mon Sep 17 00:00:00 2001 From: Yupanqui Munoz Date: Mon, 19 Mar 2018 13:48:38 +0100 Subject: Bug 532071 - [SequenceDiagram] Creation and Deletion of an element on a Lifeline should not move necessarily the other elements Change-Id: I965d1d01b68b50aec8da23f16a3f1a0125ed7d11 Signed-off-by: Yupanqui Munoz --- .../UpdateWeakReferenceForExecSpecEditPolicy.java | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UpdateWeakReferenceForExecSpecEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UpdateWeakReferenceForExecSpecEditPolicy.java index be73d8d3482..a2cb18b68cb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UpdateWeakReferenceForExecSpecEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UpdateWeakReferenceForExecSpecEditPolicy.java @@ -84,19 +84,25 @@ public class UpdateWeakReferenceForExecSpecEditPolicy extends UpdateWeakReferenc && getHost() instanceof AbstractExecutionSpecificationEditPart) { // For change bounds request command = getUpdateWeakRefForExecSpecResize((ChangeBoundsRequest) request); - } else if (request instanceof CreateViewAndElementRequest) { - // for creation request - command = getUpdateWeakRefForExecSpecCreate((CreateViewAndElementRequest) request); - } else if (request instanceof EditCommandRequestWrapper - && (getHost() instanceof AbstractExecutionSpecificationEditPart)) { - - // Check that this is a delete command, in this case, we have to recalculate the other execution specification positions - final IEditCommandRequest editCommandRequest = ((EditCommandRequestWrapper) request).getEditCommandRequest(); - if (editCommandRequest instanceof DestroyElementRequest - && ((DestroyElementRequest) editCommandRequest).getElementToDestroy() instanceof ExecutionSpecification) { - return getUpdateWeakRefForExecSpecDelete((EditCommandRequestWrapper) request); - } } + + /* + * Bug 532071 - [SequenceDiagram] Creation and Deletion of an element on a Lifeline should not move necessarily the other elements + * This code is comment due to instability (Oxygen version is not work very well). + */ +// else if (request instanceof CreateViewAndElementRequest) { +// // for creation request +// command = getUpdateWeakRefForExecSpecCreate((CreateViewAndElementRequest) request); +// } else if (request instanceof EditCommandRequestWrapper +// && (getHost() instanceof AbstractExecutionSpecificationEditPart)) { +// +// // Check that this is a delete command, in this case, we have to recalculate the other execution specification positions +// final IEditCommandRequest editCommandRequest = ((EditCommandRequestWrapper) request).getEditCommandRequest(); +// if (editCommandRequest instanceof DestroyElementRequest +// && ((DestroyElementRequest) editCommandRequest).getElementToDestroy() instanceof ExecutionSpecification) { +// return getUpdateWeakRefForExecSpecDelete((EditCommandRequestWrapper) request); +// } +// } } return null == command ? super.getCommand(request) : command; } -- cgit v1.2.3