Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2019-06-13 04:30:16 -0400
committerNicolas FAUVERGUE2019-06-13 04:30:16 -0400
commit8c4e6af213365f75c2d74bc9ca8affbd8f7b2c55 (patch)
tree577a176cb3d7b621cb22cd7bca6de6e8859facbe
parent8d9e61b2b52ba51d774875bc4fca0f7403fc10f4 (diff)
downloadorg.eclipse.papyrus-8c4e6af213365f75c2d74bc9ca8affbd8f7b2c55.tar.gz
org.eclipse.papyrus-8c4e6af213365f75c2d74bc9ca8affbd8f7b2c55.tar.xz
org.eclipse.papyrus-8c4e6af213365f75c2d74bc9ca8affbd8f7b2c55.zip
Bug 548150: [SequenceDiagram] Expection during the redo of an Asynch
Message creation The exception throw was not legit. Indeed, if we choose to do nothing more than a creation of an async edge, no exception must be throw. Change-Id: Iafc6c8a77a6322da889fd351272ae445ee3239d2 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateExecutionSpecificationWithMessage.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateExecutionSpecificationWithMessage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateExecutionSpecificationWithMessage.java
index 8b14d785590..c0d0e2fcdb3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateExecutionSpecificationWithMessage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateExecutionSpecificationWithMessage.java
@@ -125,11 +125,15 @@ public class CreateExecutionSpecificationWithMessage extends AbstractTransaction
// 2. retrieve preferences to apply
// according to the message sort
retrievePreferences();
- if (type == null || CustomDiagramGeneralPreferencePage.CHOICE_NONE.equals(preference)) {
+ if (null == type && null == preference) {
throw new ExecutionException("undefined preference"); //$NON-NLS-1$
}
- // 3. create execution specification at target
- createExecutionSpecification();
+
+ // Create the ExecutionSpecification only if needed
+ if (null != type && !CustomDiagramGeneralPreferencePage.CHOICE_NONE.equals(preference)) {
+ // 3. create execution specification at target
+ createExecutionSpecification();
+ }
return CommandResult.newOKCommandResult();
}

Back to the top