#FEATURE by cg
class: AbstractHierarchicalItem
added: #recursiveDo:skipIf:skipChildrenIf:
--- a/AbstractHierarchicalItem.st Thu May 02 18:13:07 2019 +0200
+++ b/AbstractHierarchicalItem.st Tue May 07 13:13:22 2019 +0200
@@ -1317,6 +1317,24 @@
"Modified (comment): / 12-02-2019 / 18:51:21 / Claus Gittinger"
!
+recursiveDo:aOneArgBlock skipIf:elementCheck skipChildrenIf:childrenCheck
+ "WARNING: may fetch lazy children
+ evaluate a block on each item and all the sub-items.
+ Warning: this only enumerates already visible child elements
+ i.e. any collapsed items are not visited."
+
+ self do:[:aChild| "/ notice: do does it synchronized
+ (elementCheck value:aChild) ifFalse:[
+ aOneArgBlock value:aChild.
+ ].
+ (childrenCheck value:aChild) ifFalse:[
+ aChild nonCriticalRecursiveDo:aOneArgBlock
+ ].
+ ].
+
+ "Created: / 07-05-2019 / 13:12:53 / Claus Gittinger"
+!
+
recursiveReverseDo:aOneArgBlock
"WARNING: may fetch lazy children
evaluate a block on each item and all the sub-items;