]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.server/scl/Document/All.scl
Merge commit 'bf75fd9'
[simantics/platform.git] / bundles / org.simantics.document.server / scl / Document / All.scl
index 35ab38a80ffc403db6ed5e829523c02f13040be5..1f567a6fce500ce549597c6cf4d5b7913bc05a52 100644 (file)
@@ -1,9 +1,11 @@
 import "Simantics/DB"\r
 import "Simantics/Variables"\r
+import "JavaBuiltin" as Java\r
 \r
 importJava "org.simantics.document.server.io.IConsole" where\r
     data IConsole\r
     addMessage :: IConsole -> String -> <Proc> ()\r
+    sendEvent :: IConsole -> String -> String -> Vector Dynamic -> <Proc> ()\r
 \r
 importJava "org.simantics.document.server.io.IDocument" where\r
     data IDocument\r
@@ -14,6 +16,9 @@ importJava "org.simantics.document.server.io.IDocument" where
 importJava "org.simantics.document.server.io.ITableCell" where\r
     data ITableCell\r
 \r
+importJava "org.simantics.document.server.io.ITreeTableCell" where\r
+    data ITreeTableCell\r
+\r
 importJava "org.simantics.document.server.io.IFont" where\r
     data IFont\r
 \r
@@ -56,15 +61,23 @@ importJava "org.simantics.document.server.io.CommandContextMutable" where
     data CommandContextMutable\r
 \r
     @JavaName putString\r
-    putString :: CommandContextMutable -> String -> String -> CommandContextMutable\r
+    putString :: CommandContextMutable -> String -> String -> <Proc> CommandContextMutable\r
     \r
-    putValue :: CommandContextMutable -> String -> a -> CommandContextMutable\r
+    putValue :: CommandContextMutable -> String -> a -> <Proc> CommandContextMutable\r
+\r
+    merge :: CommandContextMutable -> CommandContext -> <Proc> CommandContextMutable    \r
 \r
 importJava "org.simantics.document.server.io.CommandContextImpl" where\r
 \r
     @JavaName create\r
     commandContext :: () -> CommandContextMutable\r
 \r
+instance Coercible CommandContextMutable CommandContext where\r
+    coerce = Java.unsafeCoerce\r
+\r
+cloneCommandContext :: CommandContext -> <Proc> CommandContextMutable\r
+cloneCommandContext context = merge (commandContext ()) context\r
+\r
 importJava "org.simantics.document.server.io.CommandResult" where\r
     data CommandResult\r
 \r
@@ -112,6 +125,8 @@ importJava "org.simantics.document.server.Functions" where
     @JavaName getPropertyValueCached\r
     propertyValueCached_ :: Variable -> String -> Binding a -> <ReadGraph> a\r
     \r
+    stateVariable :: Variable -> <ReadGraph> Variable\r
+    \r
 propertyValueCached :: Serializable a => Typeable a => Variable -> String -> <ReadGraph> a\r
 propertyValueCached var prop = propertyValueCached_ var prop binding\r
     \r