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=53124fb464194fcbbf53eab3cfc04c3d1e6fab8c;hb=fdbe8762;hpb=80950353e90c09d866b9748a0ad3ddd726d6f3b4 diff --git a/bundles/org.simantics.document.server/scl/Document/All.scl b/bundles/org.simantics.document.server/scl/Document/All.scl index 53124fb46..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 @@ -115,6 +125,8 @@ importJava "org.simantics.document.server.Functions" where @JavaName getPropertyValueCached propertyValueCached_ :: Variable -> String -> Binding a -> a + stateVariable :: Variable -> Variable + propertyValueCached :: Serializable a => Typeable a => Variable -> String -> a propertyValueCached var prop = propertyValueCached_ var prop binding