Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 59941 - [Tree] Expanded state does not get set properly for an expanded/collapsed item in a tree
Summary: [Tree] Expanded state does not get set properly for an expanded/collapsed ite...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 54116
  Show dependency tree
 
Reported: 2004-04-26 10:19 EDT by Ines Khelifi CLA
Modified: 2004-04-29 13:19 EDT (History)
2 users (show)

See Also:


Attachments
Simple Java application (93.73 KB, application/octet-stream)
2004-04-26 10:23 EDT, Ines Khelifi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ines Khelifi CLA 2004-04-26 10:19:10 EDT
I have modified a simple SWT Tree code snippet 
(http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-
home/dev.html#snippets) to listen to expanded/collapsed items in a tree.
On expanded/collapsed events, I print out the expanded state of the first item 
in the tree. 

I tested two scenarios:
1- If I expand/collapse the first item and print out its expanded state, it 
does not get printed out properly. It prints out "true" when I collapse that 
particular node and "false" when I expand it. Either the node's expansion 
state is not being set properly, or my guess is that it's being set later in 
the series of events. In which case setting the enablement of the node in the 
collapse/expand event methods has no effect.
2- If I expand/collapse any item but the first one, the expanded state of the 
first item is printed out correctly.

I am attaching the sample Java application that illustrates this behavior.

I am using:
Eclipse Platform
Version: 3.0.0
Build id: 200403261517
Comment 1 Ines Khelifi CLA 2004-04-26 10:23:21 EDT
Created attachment 9955 [details]
Simple Java application

Sample code to illustrate the described problem.
Comment 2 Steve Northover CLA 2004-04-28 18:39:27 EDT
This isn't a bug.  The state gets set in the operating system after expand or 
collapse notification.
Comment 3 Tod Creasey CLA 2004-04-29 13:19:47 EDT
*** Bug 54116 has been marked as a duplicate of this bug. ***