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=df556086ed6ab61d0aa1458f5d6da06e24955172;hb=82a87b8535628d47d9c381e1a3a2296fb67c7fd0;hpb=aea3e7b117a8398471f10c31844efffc8026f815 diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index df556086e..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" @@ -265,6 +268,9 @@ importJava "org.simantics.db.common.utils.ListUtils" where @JavaName create createList :: [Resource] -> Resource + + @JavaName create + createListWithType :: Resource -> [Resource] -> Resource @javaName insertBack insertBack :: Resource -> [Resource] -> () @@ -422,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 () @@ -474,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