From: Marko Luukkainen Date: Fri, 4 Jan 2019 15:06:34 +0000 (+0200) Subject: Added addFirst/After/Before + remove SCL functions for Ordered Sets X-Git-Tag: v1.43.0~136^2~211 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=c69064f9e740eb4abe8448a63d306a085e036e1c;p=simantics%2Fplatform.git Added addFirst/After/Before + remove SCL functions for Ordered Sets gitlab #244 Change-Id: I40f921dc2f8cacf34692a0733ef6080e2d048eb7 --- diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.md b/bundles/org.simantics.scl.db/scl/Simantics/DB.md index e9aadef96..81ee3b6d8 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.md +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.md @@ -64,7 +64,8 @@ ## Ordered sets -::value[addToOrderedSet] +::value[addToOrderedSet,addFirstToOrderedSet,addAfterToOrderedSet,addBeforeToOrderedSet] +::value[removeFromOrderedSet] ::value[setOrderedSet] ::value[elementsOfOrderedSet] ::value[parentOrderedSet] diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index 2ff2f51ac..adc72bb94 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -275,9 +275,26 @@ resourceChildrenOf :: Resource -> [Resource] resourceChildrenOf r = r # L0.ConsistsOf importJava "org.simantics.db.common.utils.OrderedSetUtils" where + "`addToOrderedSet s e` adds element `e` to ordered set `s`" @JavaName add addToOrderedSet :: Resource -> Resource -> Boolean + "`addFirstToOrderedSet s e` adds element `e` to ordered set `s` as the first element" + @JavaName addFirst + addFirstToOrderedSet :: Resource -> Resource -> Boolean + + "`addAfterToOrderedSet s p e` adds element `e` to ordered set `s` after element `p`" + @JavaName addAfter + addAfterToOrderedSet :: Resource -> Resource -> Resource -> Boolean + + "`addBeforeToOrderedSet s p e` adds element `e` to ordered set `s` before element `p`" + @JavaName addBefore + addBeforeToOrderedSet :: Resource -> Resource -> Resource -> Boolean + + "`removeFromOrderedSet s e` removes element `e` from ordered set `s`" + @JavaName remove + removeFromOrderedSet :: Resource -> Resource -> Boolean + @JavaName set setOrderedSet :: Resource -> [Resource] -> Boolean