]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.db/scl/Simantics/Variables.scl
possibleVariable from resource into SCL
[simantics/platform.git] / bundles / org.simantics.scl.db / scl / Simantics / Variables.scl
index a8ffd13db76dedbe5ff5093e5e9ee722a96c7aea..12d06b76b0c5fff84d9af479cb33e7eb8d888366 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.
@@ -402,6 +408,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)