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=9a6ffde8c17267717a3113d3ecfded655e262942;hb=fa0b5e5d3c4561af251471c5a5e0511f3ca65a16;hpb=fe1a2f532761669e67da4db4ae15096ced8a04db diff --git a/bundles/org.simantics.scl.db/scl/Simantics/Variables.scl b/bundles/org.simantics.scl.db/scl/Simantics/Variables.scl index 9a6ffde8c..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,9 @@ Example: """ variable :: String -> Variable + @JavaName getPossibleVariable + possibleResourceVariable :: Resource -> Maybe Variable + @JavaName getPossibleVariable possibleVariable :: String -> Maybe Variable @@ -93,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 @@ -405,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)