]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/scl/SCL/CommandSession.scl
Expose CommandSession in SCL
[simantics/platform.git] / bundles / org.simantics.scl.compiler / scl / SCL / CommandSession.scl
diff --git a/bundles/org.simantics.scl.compiler/scl/SCL/CommandSession.scl b/bundles/org.simantics.scl.compiler/scl/SCL/CommandSession.scl
new file mode 100644 (file)
index 0000000..33b4dd7
--- /dev/null
@@ -0,0 +1,19 @@
+// This module is meant to be imported with namespace
+import "SCL/ModuleRepository"
+import "SafeDynamic"
+
+importJava "org.simantics.scl.compiler.commands.CommandSession" where
+    data CommandSession
+    
+    @JavaName "<init>"
+    create :: ModuleRepository -> <Proc> CommandSession
+
+    execute :: CommandSession -> String -> <Proc> ()
+    
+    @JavaName getVariableValueAndType
+    get :: CommandSession -> String -> <Proc> Maybe SafeDynamic
+    @JavaName setVariable
+    set :: CommandSession -> String -> SafeDynamic -> <Proc> ()
+    
+    @JavaName removeVariable
+    remove :: CommandSession -> String -> <Proc> ()
\ No newline at end of file