Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Schnekenburger2017-09-21 14:15:05 +0000
committerRemi Schnekenburger2017-09-22 07:47:40 +0000
commitce44e3ba2d983ea0f071ca5e83bb79cc07b6af7c (patch)
tree3bc31569fef720188b8f94442f95b3bd3efa837f /plugins/uml
parent97491f79217ed5fc395016f8a09efecaa48c832a (diff)
downloadorg.eclipse.papyrus-ce44e3ba2d983ea0f071ca5e83bb79cc07b6af7c.tar.gz
org.eclipse.papyrus-ce44e3ba2d983ea0f071ca5e83bb79cc07b6af7c.tar.xz
org.eclipse.papyrus-ce44e3ba2d983ea0f071ca5e83bb79cc07b6af7c.zip
Bug 522583 - [StateMachineDiagram] CreationCommand retains last state
machine and state created - "forget" the previous state/statemachine attributes when initializing model. It could be possible to unset after the initializeDiagram has been performed, but this may have deeper side effects if these attributes are reused by overriding commands. Change-Id: I8cc9a2a117274c6a3019ea86cd2429ae75b89f28 Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java
index e12ed53f3cb..414c23c5bdb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java
@@ -234,10 +234,13 @@ public class CreateStateMachineDiagramCommand extends CreateBehavioredClassifier
protected void initializeModel(EObject owner) {
if (owner instanceof StateMachine) {
stateMachine = (StateMachine) owner;
+ state = null;
} else if (owner instanceof State) {
state = (State) owner;
+ stateMachine = null;
} else {
stateMachine = UMLFactory.eINSTANCE.createStateMachine();
+ state = null;
if (owner instanceof BehavioredClassifier) {
BehavioredClassifier behaviorClassifier = (BehavioredClassifier) owner;
behaviorClassifier.getOwnedBehaviors().add(stateMachine);

Back to the top