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