Added new UC SCL script phase: cleanup 98/3698/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 11 Dec 2019 12:29:36 +0000 (14:29 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 11 Dec 2019 12:31:00 +0000 (14:31 +0200)
This is intended to support defining scripts that are ran just before
the UC is removed from the solver.

gitlab #431

Change-Id: I20c6024aa0ec61fbf79453df2fb81a3d79e4b83e

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/Messages.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/messages.properties

index 026cd9c9f05ec7226f07b940df2c7fe32f320eb7..6ee5ec77abe89da85f4b41313ea45a5182fdca7e 100644 (file)
@@ -102,7 +102,8 @@ public class ComponentTypeScriptEditor extends SCLModuleEditor {
         "analogAutomation", //$NON-NLS-1$
         "binaryAutomation", //$NON-NLS-1$
         "preparation", //$NON-NLS-1$
-        "post-preparation" //$NON-NLS-1$
+        "post-preparation", //$NON-NLS-1$
+        "cleanup", //$NON-NLS-1$
     };
     
     private static final String[] EXECUTION_PHASE_LABELS = new String[] {
@@ -112,7 +113,8 @@ public class ComponentTypeScriptEditor extends SCLModuleEditor {
         Messages.ComponentTypeScriptEditor_ExecuteAnalogAutomation,
         Messages.ComponentTypeScriptEditor_ExecuteBinaryAutomation,
         Messages.ComponentTypeScriptEditor_ExecuteBeforePreparation,
-        Messages.ComponentTypeScriptEditor_ExecuteAfterPreparation
+        Messages.ComponentTypeScriptEditor_ExecuteAfterPreparation,
+        Messages.ComponentTypeScriptEditor_ExecuteBeforeRemoval,
     };
     
     @Override
index 78ebf9c1182c3bffb9f291c6f3b2a898e31ca157..50c06334d5892d15e9663fc876af2921f00bdabb 100644 (file)
@@ -12,6 +12,7 @@ public class Messages extends NLS {
        public static String ComponentTypeScriptEditor_ExecuteBinaryAutomation;
        public static String ComponentTypeScriptEditor_ExecuteBeforePreparation;
        public static String ComponentTypeScriptEditor_ExecuteAfterPreparation;
+       public static String ComponentTypeScriptEditor_ExecuteBeforeRemoval;
        public static String ComponentTypeViewer_OpenedInReadOnly;
        public static String ComponentTypeViewerData_ContainsInvalidCharacters;
        public static String ComponentTypeViewerData_CtrlEnterApplyChanges;
index fa819c9b0bf705d4dcef718db3a5025804ede8b4..67c31ab2d23869ec8814ed1ebafb4107803b46db 100644 (file)
@@ -6,6 +6,7 @@ ComponentTypeScriptEditor_ExecuteBeforeEachStep=Execute before each step
 ComponentTypeScriptEditor_ExecuteBinaryAutomation=Execute together with binary automation
 ComponentTypeScriptEditor_ExecuteBeforePreparation=Execute before solver preparation
 ComponentTypeScriptEditor_ExecuteAfterPreparation=Execute after solver preparation
+ComponentTypeScriptEditor_ExecuteBeforeRemoval=Execute before component removal
 ComponentTypeViewer_OpenedInReadOnly=(Opened in read-only mode)
 ComponentTypeViewerData_ContainsInvalidCharacters=Property name ''{0}'' contains invalid characters, does not match pattern {1}.
 ComponentTypeViewerData_CtrlEnterApplyChanges=Ctrl+Enter to apply changes, ESC to cancel.