#BUGFIX by Maren
class: AbstractHierarchicalItem
changed: #recursiveDo:skipIf:skipChildrenIf:
consider skip element and skip children during the
whole recursion, not only for the first element
--- a/AbstractHierarchicalItem.st Sat Sep 28 17:17:46 2019 +0200
+++ b/AbstractHierarchicalItem.st Mon Sep 30 18:09:34 2019 +0200
@@ -1297,7 +1297,12 @@
!
recursiveDo:aOneArgBlock skipIf:elementCheck skipChildrenIf:childrenCheck
- "WARNING: may fetch lazy children
+ "Do recursive, but skip an element and its subtree,
+ if elementCheck evaluates to true for the element.
+ Also do not go on with the recursion for the children
+ of an element if childrenCheck evalueates to true
+ for the element.
+ 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."
@@ -1307,11 +1312,13 @@
aOneArgBlock value:aChild.
].
(childrenCheck value:aChild) ifFalse:[
- aChild nonCriticalRecursiveDo:aOneArgBlock
+ aChild recursiveDo:aOneArgBlock skipIf:elementCheck skipChildrenIf:childrenCheck
].
].
"Created: / 07-05-2019 / 13:12:53 / Claus Gittinger"
+ "Modified: / 30-09-2019 / 12:01:04 / Maren"
+ "Modified (comment): / 30-09-2019 / 18:02:46 / Maren"
!
recursiveReverseDo:aOneArgBlock