Bug 149642 - [Viewers] Virtual Tree: updateElement(parent, index) is called incorrectly
Summary: [Viewers] Virtual Tree: updateElement(parent, index) is called incorrectly
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-05 05:16 EDT by MittermeierL CLA
Modified: 2019-09-06 16:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MittermeierL CLA 2006-07-05 05:16:29 EDT
The situation: you have a virtual TreeViewer:
viewer = new TreeViewer(parent, SWT.VIRTUAL | SWT.H_SCROLL | SWT.V_SCROLL)
and you don't(!) call viewer.setUseHashlookup(true)

Then updateElement(parent, index) in your ILazyTreeContentProvider is called for all children of the first root-node in the tree immediately at application-startup, without the user expanding this root-node.

If you set viewer.setUseHashlookup(true) then it works like expected: updateElement(parent, index) is only called for nodes that become visible.
Comment 1 Robin Rosenberg CLA 2007-05-06 19:56:31 EDT
A bug matching this description and the fix surfaced in Eclipse 3.3 M7 on Linux with the Gtk window toolkit. M3-M6 and 3.2.1 and 3.2.2 worked fine. 

The call to updateElement was also recursive, leading to a stack overflow when the number of items were large.
Comment 2 Robin Rosenberg CLA 2007-05-06 20:00:54 EDT
Found a difference against the original problem. The problem occurs when an item is selected, not on startup.
Comment 3 Boris Bokowski CLA 2007-05-06 22:09:33 EDT
Does the problem go away when you configure the viewer with setUseHashlookup(true)?
Comment 4 Robin Rosenberg CLA 2007-05-07 03:52:48 EDT
(In reply to comment #3)
> Does the problem go away when you configure the viewer with
> setUseHashlookup(true)?

Yes that solves the problem.
Comment 5 Andreas Hauser CLA 2008-12-09 04:40:37 EST
(In reply to comment #1)
> A bug matching this description and the fix surfaced in Eclipse 3.3 M7 on Linux
> with the Gtk window toolkit. M3-M6 and 3.2.1 and 3.2.2 worked fine. 
> 
> The call to updateElement was also recursive, leading to a stack overflow when
> the number of items were large.
> 

Can you still find this others bug id?
I'm having the same problem as you decribe with 3.4, but can't find the bug.
Comment 6 Boris Bokowski CLA 2009-11-26 09:49:16 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 7 Eclipse Webmaster CLA 2019-09-06 16:16:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.