X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.db%2Fscl%2FSimantics%2FDB.scl;h=b24df17f8639c40cb2a020f130a911e8bf547912;hp=32019768b2f08e7c6bb930a014fa8d656413ba0b;hb=82a87b8535628d47d9c381e1a3a2296fb67c7fd0;hpb=fe1a2f532761669e67da4db4ae15096ced8a04db diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index 32019768b..b24df17f8 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -140,6 +140,9 @@ importJava "org.simantics.db.ReadGraph" where isInheritedFrom :: Resource -> Resource -> Boolean getRootLibrary :: () -> Resource + + @JavaName getPredicates + predicatesOf :: Resource -> [Resource] importJava "org.simantics.db.layer0.util.ExtendedUris" where "Converts an absolute URI to a resource" @@ -267,7 +270,7 @@ importJava "org.simantics.db.common.utils.ListUtils" where createList :: [Resource] -> Resource @JavaName create - createList :: Resource -> [Resource] -> Resource + createListWithType :: Resource -> [Resource] -> Resource @javaName insertBack insertBack :: Resource -> [Resource] -> () @@ -425,6 +428,10 @@ currentModel = match activeModel (currentProject ()) with Just model -> model Nothing -> fail "No active model." +"Gives the current active model if it exists or Nothing otherwise." +possibleCurrentModel :: Maybe Resource +possibleCurrentModel = activeModel (currentProject ()) + startUndoPoint :: String -> () startUndoPoint string = do markUndoPoint () @@ -477,4 +484,4 @@ possibleChildWithPath parent path = Just c -> possibleChild c name Nothing -> Nothing ) - (Just parent) path + (Just parent) path \ No newline at end of file