From: Tuukka Lehtonen Date: Tue, 24 Sep 2019 11:44:57 +0000 (+0300) Subject: Added two new user component SCL script simulation stages X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=320ba0935d3adeffd32a0baaf8ab279a380646bd;p=simantics%2Fplatform.git Added two new user component SCL script simulation stages 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 --- diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java index cbad48af4..4d27d6cd6 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java @@ -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"