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 05:26 Go to next message
Eclipse User
Originally posted by: dudu.amar.intel.com

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 :)

Dudu
Re: JFace tree - saving tree state while refreshing [message #854916 is a reply to message #323186] Tue, 24 April 2012 07:00 Go to previous message
zainab alhaidary is currently offline zainab alhaidary
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:earlystartup() does not work
Next Topic:[Solved] Getting project in implementation of ISpellingEngine
Goto Forum:
  


Current Time: Mon Apr 21 05:50:04 EDT 2014

Powered by FUDForum. Page generated in 3.08352 seconds