import "Simantics/DB" import "Simantics/Variables" importJava "org.simantics.document.server.io.IConsole" where data IConsole addMessage :: IConsole -> String -> () importJava "org.simantics.document.server.io.IDocument" where data IDocument elementIdToObjectId :: IDocument -> String -> String getDocumentURI :: IDocument -> String getSessionGUID :: IDocument -> String 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 importJava "org.simantics.document.server.io.IColor" where data IColor importJava "org.simantics.modeling.services.ComponentNamingStrategy" where data ComponentNamingStrategy importJava "org.simantics.document.server.handler.EventHandler" where data EventHandler importJava "org.simantics.document.server.handler.AbstractEventHandler" where data AbstractEventHandler importJava "org.simantics.document.server.bean.Command" where data Command importJava "org.simantics.document.server.bean.DataDefinition" where data DataDefinition importJava "org.simantics.document.server.io.CommandContext" where data CommandContext @JavaName getString possibleString :: CommandContext -> String -> Maybe String @JavaName getValue possibleValue :: CommandContext -> String -> Maybe a @JavaName getValue justValue :: CommandContext -> String -> a @JavaName containsKey containsKey :: CommandContext -> String -> Boolean getKeys :: CommandContext -> [String] importJava "org.simantics.document.server.io.CommandContextMutable" where data CommandContextMutable @JavaName putString putString :: CommandContextMutable -> String -> String -> CommandContextMutable putValue :: CommandContextMutable -> String -> a -> CommandContextMutable importJava "org.simantics.document.server.io.CommandContextImpl" where @JavaName create commandContext :: () -> CommandContextMutable importJava "org.simantics.document.server.io.CommandResult" where data CommandResult importJava "org.simantics.document.server.serverResponse.ServerResponse" where @JavaName create commandResult :: Integer -> String -> CommandContextMutable -> CommandResult importJava "org.simantics.document.server.Functions" where @JavaName putTuple putTuple :: CommandContextMutable -> String -> a -> CommandContextMutable @JavaName getTuples getTuples :: CommandContext -> String -> [a] printContext :: CommandContext -> String commandList :: Variable -> [Command] dataDefinitions :: Variable -> [DataDefinition] emptyOnClick :: () -> AbstractEventHandler writeEventHandler :: Variable -> (Variable -> (String -> Maybe String) -> String) -> AbstractEventHandler readEventHandler :: Variable -> (Variable -> (String -> Maybe String) -> String) -> AbstractEventHandler eventHandler :: ((String -> Maybe String) -> String) -> AbstractEventHandler readEventHandler2 :: (CommandContext -> Maybe CommandResult) -> AbstractEventHandler writeEventHandler2 :: (CommandContext -> Maybe CommandResult) -> AbstractEventHandler eventHandler2 :: (CommandContext -> Maybe CommandResult) -> AbstractEventHandler responseHandler :: Variable -> String -> AbstractEventHandler sclStateVariable :: Variable -> Variable -> String -> Variable sclStateValueOrDefault :: Variable -> Variable -> String -> a -> a setSclStateValue :: Variable -> Variable -> String -> a -> () projectComponentState :: Variable -> String -> a -> a setProjectComponentState :: Variable -> String -> a -> () documentModelContribution :: Resource -> [Variable] documentModelContributionLabel :: Variable -> String @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 displayValue :: Variable -> String -> String displayValue var str = propertyValue (property var str) "HasDisplayValue" displayValue0 :: Variable -> String displayValue0 var = propertyValue var "HasDisplayValue" consoleLog :: Variable -> String -> () consoleLog state message = do console = state#console runProc $ addMessage console message contextDocument :: CommandContext -> IDocument contextDocument ctx = justValue ctx "__document__"