Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 5771 - TreeViewer bug preserving expansion state
Summary: TreeViewer bug preserving expansion state
Status: RESOLVED DUPLICATE of bug 3840
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 14959 15562 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-11-10 22:42 EST by Craig Salter CLA
Modified: 2002-07-22 10:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Salter CLA 2001-11-10 22:42:07 EST
I'm using a TreeViewer and I've noticed that the expansion state doen't seem to 
be preserved correctly when model objects are inserted or removed.  

If I have the following tree, where A,B, and D are expanded.

[-] A
     [-] B
     [+] C
     [-] D

Then I add an X object into my model before B ... which triggers a 
viewer.refresh().  Now A, X and C are expanded.  

[-] A
     [-] X
     [+] B
     [-] C
     [+] D

There appears to be a bug in the AbstractTreeViewer code (likely in the  
updateChildren() method) such that the item.getData() information is not being 
respected when attempting to preserve expansion state.  The result (as shown 
above) is that the expansion state is associated with the wrong tree items.
Comment 1 Nick Edgar CLA 2002-05-08 16:36:06 EDT
*** Bug 15562 has been marked as a duplicate of this bug. ***
Comment 2 James Moody CLA 2002-05-16 14:36:32 EDT
*** Bug 14959 has been marked as a duplicate of this bug. ***
Comment 3 Nick Edgar CLA 2002-07-22 10:46:01 EDT

*** This bug has been marked as a duplicate of 3840 ***