|
@@ -1,7 +1,7 @@
|
|
|
"""
|
|
|
Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
|
|
|
|
|
|
-Date: Tue Nov 7 11:39:35 2017
|
|
|
+Date: Tue Nov 7 13:29:19 2017
|
|
|
|
|
|
Model author: Yentl Van Tendeloo
|
|
|
Model name: Modelverse Visual Editor - Tkinter Version
|
|
@@ -9011,18 +9011,15 @@ class ActivityCreator(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
|
|
|
# transition /modifying_mm
|
|
|
_modifying_mm_0 = Transition(self, self.states["/modifying_mm"], [self.states["/finish_transformation_add"]])
|
|
|
- _modifying_mm_0.setAction(self._modifying_mm_0_exec)
|
|
|
_modifying_mm_0.setTrigger(None)
|
|
|
_modifying_mm_0.setGuard(self._modifying_mm_0_guard)
|
|
|
self.states["/modifying_mm"].addTransition(_modifying_mm_0)
|
|
|
_modifying_mm_1 = Transition(self, self.states["/modifying_mm"], [self.states["/modifying_mm"]])
|
|
|
- _modifying_mm_1.setAction(self._modifying_mm_1_exec)
|
|
|
_modifying_mm_1.setTrigger(Event("_0after"))
|
|
|
self.states["/modifying_mm"].addTransition(_modifying_mm_1)
|
|
|
|
|
|
# transition /finish_transformation_add
|
|
|
_finish_transformation_add_0 = Transition(self, self.states["/finish_transformation_add"], [self.states["/closing"]])
|
|
|
- _finish_transformation_add_0.setAction(self._finish_transformation_add_0_exec)
|
|
|
_finish_transformation_add_0.setTrigger(Event("mv_response", None))
|
|
|
self.states["/finish_transformation_add"].addTransition(_finish_transformation_add_0)
|
|
|
|
|
@@ -9403,7 +9400,6 @@ class ActivityCreator(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
def _ready_8_exec(self, parameters):
|
|
|
evt = parameters[0]
|
|
|
self.current = int(evt.split("input_browse_", 1)[1])
|
|
|
- print("Browse button pressed for " + str(self.input_map[self.current]))
|
|
|
|
|
|
def _ready_8_guard(self, parameters):
|
|
|
evt = parameters[0]
|
|
@@ -9412,7 +9408,6 @@ class ActivityCreator(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
def _ready_9_exec(self, parameters):
|
|
|
evt = parameters[0]
|
|
|
self.current = int(evt.split("output_browse_", 1)[1])
|
|
|
- print("Browse button pressed for " + str(self.output_map[self.current]))
|
|
|
|
|
|
def _ready_9_guard(self, parameters):
|
|
|
evt = parameters[0]
|
|
@@ -9424,23 +9419,13 @@ class ActivityCreator(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
|
|
|
def _creating_0_exec(self, parameters):
|
|
|
context = parameters[0]
|
|
|
- print("Got context: " + str(context))
|
|
|
self.context = context
|
|
|
model_to_modify = "merged/%s" % self.activity_name
|
|
|
self.subprocess = subprocess.Popen([sys.executable, sys.argv[0], "--address", data['mv_address'], "--username", data['username'], "--password", data['password'], "--model", model_to_modify, "--limited"])
|
|
|
|
|
|
- def _modifying_mm_0_exec(self, parameters):
|
|
|
- print("Not alive anymore...")
|
|
|
-
|
|
|
def _modifying_mm_0_guard(self, parameters):
|
|
|
return self.subprocess.poll() is not None
|
|
|
|
|
|
- def _modifying_mm_1_exec(self, parameters):
|
|
|
- print("Checking whether or not subprocess is still alive...")
|
|
|
-
|
|
|
- def _finish_transformation_add_0_exec(self, parameters):
|
|
|
- print("FINISHED")
|
|
|
-
|
|
|
def _closing_0_exec(self, parameters):
|
|
|
self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("close_window", None, [])]))
|
|
|
|
|
@@ -12328,6 +12313,7 @@ class CanvasElement(RuntimeClassBase, SCCDWidget):
|
|
|
self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("mv_request", None, ['attr_assign', [current_rendered_model, self.cs_element, 'dirty', True]])]))
|
|
|
|
|
|
def _update_mv_x_enter(self):
|
|
|
+ print("Moving element %s in model %s" % (self.cs_element, current_rendered_model))
|
|
|
self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("mv_request", None, ['attr_assign', [current_rendered_model, self.cs_element, 'x', self.coordinates[0]]])]))
|
|
|
|
|
|
def _update_mv_y_enter(self):
|