|
Re: preserving tree state when updating viewer input [message #461581 is a reply to message #461580] |
Mon, 26 September 2005 20:19 |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Duncan Krebs" <duncan@krebsnet.com> wrote in message
news:910dade3fa42f6ba732e1ec296c89bef$1@www.eclipse.org...
> Hi,
> I'm getting tired of my Jface tree viewer minimizing itself after I update
> the tree with new data when the user returns from a wizard. To update the
> data I'm just calling the setInput method of the tree viewer with the
> updated data. After I do this the tree gets minimized again.
> Does anyone know how I can keep the tree expanded after setting the input?
> Is there a different method to call to update the data with? Can I say
> something like "expand the tree to the first level." Thanks for any
> ideas. - Duncan
Instead of calling setInput, why not just update the model and call
refresh()?
---
Sunil
|
|
|
|
Re: preserving tree state when updating viewer input [message #461709 is a reply to message #461708] |
Tue, 27 September 2005 20:30 |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Duncan Krebs" <duncan@krebsnet.com> wrote in message
news:9aed499027baa2ab2786912fc387a3b5$1@www.eclipse.org...
> Sunil Kamath wrote:
>
>> Instead of calling setInput, why not just update the model and call
>> refresh()?
>> ---
>> Sunil
>
> Thanks for the suggestion, I rewrote my code so it does that. After the
> model update and refresh it keeps the first level of the tree expanded but
> does not preserve the state of additional levels that were expanded before
> the refresh (it closes them all but the first level). Do you know if this
> is regular behavior?
>
I think it depends upon which elements were changed.
Do you have a working snippet that shows the problem?
---
Sunil
|
|
|
Powered by
FUDForum. Page generated in 0.02836 seconds