Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » JFace tree - saving tree state while refreshing
JFace tree - saving tree state while refreshing [message #323186] Thu, 13 December 2007 10:26 Go to next message
Eclipse UserFriend
Originally posted by:

Hi all,

I have a JFace TreeViewer. When I need to refresh the tree, I'm using the setInput method to set a new input (because i don't know how to determine if the input indeed changed), so the object are always different after refreshing, but their content is the same (and I've overrided the 'equals' method to reflect that).

My problem is I can't figure out how to save the tree state (which nodes are expanded and which node is selected). I tried to call getExpanded and getSelection before the setInput, and after it to call setExpanded and setSelection, but it won't works.

Many thanks to the helpers :)

Re: JFace tree - saving tree state while refreshing [message #854916 is a reply to message #323186] Tue, 24 April 2012 11:00 Go to previous message
zainab alhaidary is currently offline zainab alhaidaryFriend
Messages: 20
Registered: April 2012
Junior Member
I have the same problem, please let me know if you figured out how to solve it.
Previous Topic:How to check state of a check box menu item
Next Topic:adding extrnal jar file into eclipse classpath
Goto Forum:

Current Time: Sun Apr 22 09:05:24 GMT 2018

Powered by FUDForum. Page generated in 0.02045 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software