Refresh TreeViewer with attached ViewerFilter [message #516859] |
Thu, 25 February 2010 06:48  |
Eclipse User |
|
|
|
Hi,
I'm using a TreeViewer with a ViewerFilter. The ViewerFilter holds a Set of Nodes. Only nodes contained in this Set should be displayed by the TreeViewer.
The implementation of select is sort of:
public boolean select(Viewer viewer, Object parentElement, Object element) {
return setWithNodesToBeDisplayed.contains(element);
}
Works fine until I change the content of the Set and call viewer.refresh(): the ViewerFilter is not called by the TreeViewer to check the domain objects against the filter.
The viewer.update(...)-methods will do this but then I have to pass the underlying domainobjects which are affected by the filter. So I have to traverse the domain-model for myself calling update(actualNode,true).
Am I missing something or is there a more efficient approach to handle the problem ? Why isn't ViewerFilter.select() called by viewer.refresh()?
Thanks in advance,
Jens
I
|
|
|
|
Powered by
FUDForum. Page generated in 0.04977 seconds