X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.db%2Fscl%2FSimantics%2FVariables.scl;h=43be6defbb6ee486957572caff2abe9d0a93f226;hp=a8ffd13db76dedbe5ff5093e5e9ee722a96c7aea;hb=fa0b5e5d3c4561af251471c5a5e0511f3ca65a16;hpb=10e20331b5323ca47bdcfa0e12739cf543cf370a diff --git a/bundles/org.simantics.scl.db/scl/Simantics/Variables.scl b/bundles/org.simantics.scl.db/scl/Simantics/Variables.scl index a8ffd13db..43be6defb 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/Variables.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/Variables.scl @@ -21,6 +21,12 @@ Example: """ variable :: String -> Variable + @JavaName getPossibleVariable + possibleResourceVariable :: Resource -> Maybe Variable + + @JavaName getPossibleVariable + possibleVariable :: String -> Maybe Variable + @JavaName getVariable """ Function **resourceVariable** converts a resource to a corresponding variable. @@ -90,6 +96,9 @@ importJava "org.simantics.db.layer0.function.All" where importJava "org.simantics.db.layer0.variable.VariableMap" where data VariableMap +importJava "org.simantics.db.layer0.variable.StructuredProperty" where + data StructuredProperty + importJava "org.simantics.db.layer0.variable.ResourceCollectionVariableMap" where @JavaName "" createVariableMap :: [Resource] -> VariableMap @@ -402,6 +411,7 @@ instance Show Variable where instance Browsable Variable where fromUri = variable uriOf = uri + possibleUriOf v = Just (uri v) nameOf = name possibleNameOf v = Just (name v) children v = collectionToList (children_ v)