From: Tuukka Lehtonen Date: Wed, 11 Dec 2019 12:29:36 +0000 (+0200) Subject: Added new UC SCL script phase: cleanup X-Git-Tag: v1.43.0~136^2~20 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F3698%2F2;p=simantics%2Fplatform.git Added new UC SCL script phase: cleanup This is intended to support defining scripts that are ran just before the UC is removed from the solver. gitlab #431 Change-Id: I20c6024aa0ec61fbf79453df2fb81a3d79e4b83e --- 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 026cd9c9f..6ee5ec77a 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 @@ -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 diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/Messages.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/Messages.java index 78ebf9c11..50c06334d 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/Messages.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/Messages.java @@ -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; diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/messages.properties b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/messages.properties index fa819c9b0..67c31ab2d 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/messages.properties +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/messages.properties @@ -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.