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=35ab38a80ffc403db6ed5e829523c02f13040be5;hb=fdbe8762;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.document.server/scl/Document/All.scl b/bundles/org.simantics.document.server/scl/Document/All.scl index 35ab38a80..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 @@ -14,6 +16,9 @@ importJava "org.simantics.document.server.io.IDocument" where importJava "org.simantics.document.server.io.ITableCell" where data ITableCell +importJava "org.simantics.document.server.io.ITreeTableCell" where + data ITreeTableCell + importJava "org.simantics.document.server.io.IFont" where data IFont @@ -56,15 +61,23 @@ importJava "org.simantics.document.server.io.CommandContextMutable" where data CommandContextMutable @JavaName putString - putString :: CommandContextMutable -> String -> String -> CommandContextMutable + putString :: CommandContextMutable -> String -> String -> CommandContextMutable - putValue :: CommandContextMutable -> String -> a -> CommandContextMutable + 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 @@ -112,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