Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 62268

Summary: TreeViewer with filter bypasses content provider hasChildren
Product: [Eclipse Project] Platform Reporter: Michael Valenta <Michael.Valenta>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P2 CC: markus.kell.r
Version: 3.0   
Target Milestone: 3.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Michael Valenta CLA 2004-05-14 10:04:27 EDT
We have remote content providers that implement the 
ITreeContentProvider#hasChildren check so that the contents or remote folders 
are not fetched and a plus is always shown. If a tree viewer has a filter, it 
then fetches the children anyway. This could be fixed with API that provided 
the element and the filter to the content provider (but were API frozen:-(. We 
have a bug caused by this (bug 62207) and I am concerned that other plugin 
providers who do similar tricks will be bitten by this. Also, this has 
extremly bad interaction with the deferred content provider (as illustrated in 
bug 62207). Either this bug must be fixed for 3.0 or the spec of the deferred 
content provider must state that it cannot, under any circumstances, be used 
in a tree view with a filter.
Comment 1 Markus Keller CLA 2004-05-14 10:42:20 EDT
The behavior was introduced as fix for bug 44393.
Comment 2 Tod Creasey CLA 2004-05-14 11:43:04 EDT
We should update the javadoc to indicate this issue. The problem with 
filtering is that there is no way we can know whether there are children or 
not without asking.

Having said that I will point to the isExpandable() method in 
AbstractTreeViewer as a viewer implementor could always override it.
Comment 3 Tod Creasey CLA 2004-05-17 12:23:02 EDT
I have updated the javadoc as requested.
Comment 4 John Arthorne CLA 2004-06-04 14:30:02 EDT
Reopening
Comment 5 John Arthorne CLA 2004-06-04 14:30:15 EDT

*** This bug has been marked as a duplicate of 65762 ***
Comment 6 Tod Creasey CLA 2004-06-04 15:08:03 EDT
We have rolled back the change.