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

Bug 309406

Summary: [Viewers] [viewers] #expandToLevel(Object, level) retrieves all children when virtual
Product: [Eclipse Project] Platform Reporter: Boris Bokowski <bokowski>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, daniel_megert, darin.eclipse, francisu, hsoliwal, markus.kell.r, ndsilva, pawel.1.piech
Version: 3.4.2   
Target Milestone: 3.5.2+   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 305739, 309407    
Bug Blocks: 304277    

Description Boris Bokowski CLA 2010-04-15 20:33:53 EDT
+++ This bug was initially created as a clone of Bug #305739 +++

3.4.2 (M20090211-1700)

Calling TreeViewer#expandToLevel(Object, level) when using a tree viewer with a lazy content provider and SWT.VIRTUAL style, causes all children to be retrived via org.eclipse.jface.viewers.ILazyTreePathContentProvider.updateElement(TreePath, int). 

I would expect that expanding an element in the tree would only trigger the retrieval of the visible elements, since the tree is virtual. This is noticeable in the debugger when there is a deep stack (say 400 frames). In this case the debugger calls back to replace each element in the tree (once for each child - 400 times in this case).

See related bug 304277, in debug.
Comment 1 Boris Bokowski CLA 2010-04-15 20:34:25 EDT
Fix needs to be applied to R3_5_maintenance.
Comment 2 Markus Keller CLA 2015-10-28 10:39:28 EDT
Closing outdated bug.