From: Marko Luukkainen Date: Tue, 29 Jan 2019 11:06:53 +0000 (+0200) Subject: Rename linked list functions that are overlapping or are too generic X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=9276457d7a4702c1c137b54b71924d2df570a83e;p=simantics%2Fplatform.git Rename linked list functions that are overlapping or are too generic gitlab #250 Change-Id: Iae2e7ffc420970cb52c85c391361f02da3be3f28 (cherry picked from commit 0f1223c3cce41690160216eb1ec7be38f7bf4571) --- diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.md b/bundles/org.simantics.scl.db/scl/Simantics/DB.md index e9aadef96..ff2c68bfb 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.md +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.md @@ -69,6 +69,12 @@ ::value[elementsOfOrderedSet] ::value[parentOrderedSet] +## Linked List + +::value[elementsOfList,createList,createListWithType] +::value[insertListBack,insertListFront,removeListElement] +::value[swapListElementWithPrevious,swapListElementWithNext] + ## Transactions ::value[syncRead, asyncRead] diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index a400659ee..dca263460 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -279,26 +279,35 @@ importJava "org.simantics.db.common.utils.OrderedSetUtils" where elementsOfOrderedSet :: Resource -> [Resource] importJava "org.simantics.db.common.utils.ListUtils" where + "`elementsOfList l` returns elements of list `l`" @JavaName toList elementsOfList :: Resource -> [Resource] + "`createList [e]` creates a new list containing elements `[e]`" @JavaName create createList :: [Resource] -> Resource + "`createListWithType t [e]` creates a new list with type `t` containing elements `[e]`" @JavaName create createListWithType :: Resource -> [Resource] -> Resource - @javaName insertBack - insertBack :: Resource -> [Resource] -> () + "`insertListBack l [e]` inserts elements `[e]` back to the list `l`" + @JavaName insertBack + insertListBack :: Resource -> [Resource] -> () - @javaName removeElement - removeElement :: Resource -> Resource -> Boolean + "`insertListFront l [e]` inserts elements `[e]` front of the list `l`" + @JavaName insertFront + insertListFront :: Resource -> [Resource] -> () - @javaName swapWithPrevious - swapWithPrevious :: Resource -> Resource -> Boolean + "`removeListElement l e` removes a element `e` from the list `l`" + @JavaName removeElement + removeListElement :: Resource -> Resource -> Boolean + + @JavaName swapWithPrevious + swapListElementWithPrevious :: Resource -> Resource -> Boolean - @javaName swapWithNext - swapWithNext :: Resource -> Resource -> Boolean + @JavaName swapWithNext + swapListElementWithNext :: Resource -> Resource -> Boolean importJava "org.simantics.db.common.utils.CommonDBUtils" where