Community
Participate
Working Groups
Build Identifier: Version: 3.5.1 Build id: M20090917-0800 In the case that a tree consists of two duplicates tree objects, only the first one will be processed. With duplicates objects I means the same object can be found in the tree in more then one distinct path. The problem is found in the method: PatternFilter.isAnyVisible(Viewer viewer, Object parent, Object[]elements) … Boolean foundAny = (Boolean) foundAnyCache.get(parent); If parent already found in the tree, then it will be not processed again if the same object will be found in the other tree path. … Reproducible: Always Steps to Reproduce: 1.Add PatternFilter to a viewer 2.add an object twice to the tree with distinct children 3.search for a child name in the second object. The child will be not found
I assume you are using a FilteredTree; this limitation is because we cache the already filtered results. The existing behaviour is a very common use-case; and what you see is an optimization. I do not intend to change this ATM. It is possible for you to work around this limitation 1) By sublclassing FilteredTree (see method protected TreeViewer doCreateTreeViewer(Composite parent, int style)) 2) Adding your own filter along the lines of PatternFilter
Closing the bug as WONTFIX; read Comment 1.