javafilteringjfacetreeviewer

An "OR" predicate on ViewerFilter in spite of the default "And" predicates?


I am developing a RCP application which contains a TreeViewer and I want to activate multiple filters on it that should work with the "OR" predicates, for example :


A
|--B
|--|--redColor
|--|--blueColor
|--C
|--|--greenColor

I have a filter to show the redColor and a filter to show the greenColor. but when activating these two filters together, nothing is displayed.

My filter class extends the ViewerFilter class


Solution

  • You have to make a single ViewerFilter that has the "or" condition inside of it, not two separate filters.