Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » TreeViewer with lazy loading
TreeViewer with lazy loading [message #189943] Mon, 01 August 2005 11:37 Go to next message
Eclipse UserFriend
Hi,

I try to set up a TreeViewer in my OutlineView so it has "lazy loading". The
children of an expanded TreeItem shall be calculated when the item is set to
the expanded state. Is this possible wih the GEF TreeViewer? Where can I add
a listener which notifies about expanding/collapsing events?

Thx in advance
Re: TreeViewer with lazy loading [message #190413 is a reply to message #189943] Wed, 03 August 2005 18:19 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

The usual way to do this in GraphicalViewers is to return an empty list from
the getModelChildren() method of your EditPart. So, it's children parts
would not be created. Later, when something triggers the lazy loading, you
would invoke refreshChildren() and your getModelChildren() would return the
actual children. However, with TreeViewer, you'll run into the problem that
the trigger for lazy loading is clicking on the plus sign next to the tree
item, and there would be no such sign if the tree item doesn't have any
children initially. Maybe you can play around with that and find a way.
Perhaps returning some bogus model might do it.


"Philipp Marx" <irritated@gmx.de> wrote in message
news:dcl1er$fhs$1@news.eclipse.org...
> Hi,
>
> I try to set up a TreeViewer in my OutlineView so it has "lazy loading".
The
> children of an expanded TreeItem shall be calculated when the item is set
to
> the expanded state. Is this possible wih the GEF TreeViewer? Where can I
add
> a listener which notifies about expanding/collapsing events?
>
> Thx in advance
>
>
Previous Topic:showing feedback on connections adjacent to selected element
Next Topic:How to force edit refresh when preferences change?
Goto Forum:
  


Current Time: Fri Apr 26 17:18:46 GMT 2024

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

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

Back to the top