]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added two new user component SCL script simulation stages 77/3277/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 24 Sep 2019 11:44:57 +0000 (14:44 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 24 Sep 2019 12:25:40 +0000 (15:25 +0300)
1. pre-step: executed during each simulation step,
   before native simulation stepping
2. post-step: executed during each simulation step,
   after native and all other stepping logics

The purpose of these is to allow simulation step initialization and
finalization with UC SCL scripts.

Adapted from master commit 1653df0843d89e68b8e476bda2133e781a667c04.

gitlab #389

Change-Id: Icce3fc19e3241d25364de129ecb511aaf092ae80

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java

index cbad48af48bfac990542f6bc8c7cf6dd08ae88e5..4d27d6cd62ba866d6a512f1bdcf9ee9acb432b7c 100644 (file)
@@ -39,7 +39,6 @@ import org.simantics.db.layer0.request.combinations.Combinators;
 import org.simantics.db.request.Read;
 import org.simantics.layer0.Layer0;
 import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;
-import org.simantics.scl.ui.editor.SharedTextColorsNew;
 import org.simantics.structural.stubs.StructuralResource2;
 import org.simantics.ui.workbench.IResourceEditorInput;
 import org.simantics.ui.workbench.TitleUpdater;
@@ -103,14 +102,18 @@ public class ComponentTypeScriptEditor extends SCLModuleEditor {
     }
     
     private static final String[] EXECUTION_PHASES = new String[] {
+        "pre-step",
         "step",
+        "post-step",
         "analogAutomation",
         "binaryAutomation",
         "preparation"
     };
     
     private static final String[] EXECUTION_PHASE_LABELS = new String[] {
+        "Execute before each step",
         "Execute at each step",
+        "Execute after each step",
         "Execute together with analog automation",
         "Execute together with binary automation",
         "Execute during preparation"