isFilterProperty never fires for a ViewerFilter [message #460905] |
Tue, 02 January 2007 10:40 |
Eclipse User |
|
|
|
I've added the following filter (ViewerFilter) to my tree viewer. The
> filter works as expected (ie, the select method). I added the
> isFilterProperty method to manage refreshing of the filter when the
> certain properties changed. But it never fires! I've set break points
> in both the select method and the isFilterProperty method and only the
> ones in the select method ever break. I've even changed the method to
> always return true and it has no effect (since it never appears to fire).
>
> What am I doing wrong?
>
>
> myTreeViewer.addFilter( new ViewerFilter() {
>
> public boolean select(Viewer viewer, Object parentElement, Object
> element) {
> boolean OK = true;
>
> /*
> * logic here to set the value of OK depending on the data
> */
>
> return OK;
> }
>
> public boolean isFilterProperty(Object element, String property) {
> if( element instanceof myObject && property == "ActiveLocale") {
> return true;
> } else return false;
> }
> }
> );
|
|
|
Powered by
FUDForum. Page generated in 0.02646 seconds