]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.db/scl/Simantics/Variables.scl
Merge "Added null check after getPossibleType(STR.Component)"
[simantics/platform.git] / bundles / org.simantics.scl.db / scl / Simantics / Variables.scl
index a8ffd13db76dedbe5ff5093e5e9ee722a96c7aea..43be6defbb6ee486957572caff2abe9d0a93f226 100644 (file)
@@ -21,6 +21,12 @@ Example:
     """
     variable :: String -> <ReadGraph> Variable
     
+    @JavaName getPossibleVariable
+    possibleResourceVariable :: Resource -> <ReadGraph> Maybe Variable
+
+    @JavaName getPossibleVariable
+    possibleVariable :: String -> <ReadGraph> 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 "<init>"
     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)