Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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