|
@@ -1401,30 +1401,33 @@
|
|
|
</state>
|
|
|
|
|
|
<state id="modelling" initial="recognized_operation">
|
|
|
- <onentry>
|
|
|
- <script>
|
|
|
- # TODO enter a specific model
|
|
|
- pass
|
|
|
- </script>
|
|
|
- </onentry>
|
|
|
-
|
|
|
<onexit>
|
|
|
- <script>
|
|
|
- # TODO exit the specific model
|
|
|
- pass
|
|
|
- </script>
|
|
|
+ <raise event="request">
|
|
|
+ <parameter expr="'exit'"/>
|
|
|
+ </raise>
|
|
|
</onexit>
|
|
|
|
|
|
<state id="recognized_operation" initial="manual">
|
|
|
<state id="manual">
|
|
|
<onentry>
|
|
|
self.context = None
|
|
|
+ self.current_model = self.actions[None][0].parameters[0]
|
|
|
</onentry>
|
|
|
|
|
|
<transition cond="self.expect_action(self.context, 'exit')" target="../../../megamodelling"/>
|
|
|
+
|
|
|
+ <transition cond="self.actions[self.context] and self.actions[0].parameters != self.current_model" target="../../../megamodelling">
|
|
|
+ <script>
|
|
|
+ print("Sudden switch between two models: perform context switch!")
|
|
|
+ </script>
|
|
|
+ </transition>
|
|
|
</state>
|
|
|
|
|
|
<state id="scripted">
|
|
|
+ <onentry>
|
|
|
+ self.current_model = None
|
|
|
+ </onentry>
|
|
|
+
|
|
|
<transition cond="self.expect_action(self.context, 'exit')" target="../../../../operations/history"/>
|
|
|
</state>
|
|
|
|
|
@@ -1537,7 +1540,7 @@
|
|
|
</transition>
|
|
|
</state>
|
|
|
|
|
|
- <transition cond="self.context is not None and self.unexpected_action(self.context)" target=".">
|
|
|
+ <transition cond="self.context is not None and self.actions[self.context]" target=".">
|
|
|
<script>
|
|
|
print("Got unexpected operation: " + str(self.actions[self.context][0]))
|
|
|
</script>
|
|
@@ -1548,7 +1551,7 @@
|
|
|
</raise>
|
|
|
</transition>
|
|
|
|
|
|
- <transition cond="self.context is None and self.unexpected_action(self.context)" target="../megamodelling">
|
|
|
+ <transition cond="self.context is None and self.action[None]" target="../megamodelling">
|
|
|
<script>
|
|
|
print("Got megamodelling operation in model: transferring")
|
|
|
</script>
|