| Summary: | TreeViewer bug preserving expansion state | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Craig Salter <csalter> |
| Component: | UI | Assignee: | Nick Edgar <n.a.edgar> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | major | ||
| Priority: | P2 | CC: | hudsonr, James_Moody |
| Version: | 1.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** Bug 15562 has been marked as a duplicate of this bug. *** *** Bug 14959 has been marked as a duplicate of this bug. *** |
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.