X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.server%2Fscl%2FDocument%2FAll.scl;h=1f567a6fce500ce549597c6cf4d5b7913bc05a52;hp=3d63eaf6a9463ade923a41b168ac0ba78a4d9fd5;hb=bf75fd9740858140eac90c18f0bca0aea3893248;hpb=21f879fcd72d7749836fb64375094ef29573fe8c diff --git a/bundles/org.simantics.document.server/scl/Document/All.scl b/bundles/org.simantics.document.server/scl/Document/All.scl index 3d63eaf6a..1f567a6fc 100644 --- a/bundles/org.simantics.document.server/scl/Document/All.scl +++ b/bundles/org.simantics.document.server/scl/Document/All.scl @@ -1,9 +1,11 @@ import "Simantics/DB" import "Simantics/Variables" +import "JavaBuiltin" as Java importJava "org.simantics.document.server.io.IConsole" where data IConsole addMessage :: IConsole -> String -> () + sendEvent :: IConsole -> String -> String -> Vector Dynamic -> () importJava "org.simantics.document.server.io.IDocument" where data IDocument @@ -63,11 +65,19 @@ importJava "org.simantics.document.server.io.CommandContextMutable" where putValue :: CommandContextMutable -> String -> a -> CommandContextMutable + merge :: CommandContextMutable -> CommandContext -> CommandContextMutable + importJava "org.simantics.document.server.io.CommandContextImpl" where @JavaName create commandContext :: () -> CommandContextMutable +instance Coercible CommandContextMutable CommandContext where + coerce = Java.unsafeCoerce + +cloneCommandContext :: CommandContext -> CommandContextMutable +cloneCommandContext context = merge (commandContext ()) context + importJava "org.simantics.document.server.io.CommandResult" where data CommandResult