cloneCommandContext :: CommandContext -> <Proc> CommandContextMutable
cloneCommandContext context = merge (commandContext ()) context
+instance Show CommandContext where
+ show ctx = printContext ctx
+
importJava "org.simantics.document.server.io.CommandResult" where
data CommandResult
putTuple :: CommandContextMutable -> String -> a -> CommandContextMutable
@JavaName getTuples
- getTuples :: CommandContext -> String -> [a]
+ getTuples :: CommandContext -> String -> [Dynamic]
printContext :: CommandContext -> String
stateVariable :: Variable -> <ReadGraph> Variable
+ compileDocumentSCLValueExpression :: Variable -> <ReadGraph> String
+
propertyValueCached :: Serializable a => Typeable a => Variable -> String -> <ReadGraph> a
propertyValueCached var prop = propertyValueCached_ var prop binding
displayValue0 :: Variable -> <ReadGraph> String
displayValue0 var = propertyValue var "HasDisplayValue"
-consoleLog :: Variable -> String -> <ReadGraph> ()
-consoleLog state message = do
- console = state#console
- runProc $ addMessage console message
+consoleLog :: CommandContext -> String -> ()
+consoleLog context message = match possibleValue context "console" with
+ Nothing -> ()
+ Just console -> runProc $ addMessage console message
contextDocument :: CommandContext -> <Proc> IDocument
contextDocument ctx = justValue ctx "__document__"