Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Need help with virtial tree viewer
Need help with virtial tree viewer [message #309471] Fri, 27 October 2006 14:36 Go to next message
Robert Berger is currently offline Robert BergerFriend
Messages: 2
Registered: July 2009
Junior Member
I need to display a tree with a managable number of top level (direct
children of the root) nodes, but a very large number of lower level nodes.
I changed my application to use SWT.VIRTUAL with an ILazyContent provider
and the performance boost was tremendous.

The problem is, I need to use TreeViewer.reveal() to programatically
scroll the viewer to a specific top level node. I do not use reveal on
lower level nodes that aren't direct children of the root.

In my current naive implementation, the reveal() call only works if the
user has already scrolled the viewer so the target object passed to
reveal() has been visible.

How can I fix this? What I probably need is a way to force the tree
viewer to do the callbacks to my content provider for all the children of
the root, while continuing to use lazy evaluation for the deeper nodes.

Robert Berger
Software Architect
bBerger Technologies, Inc.
Re: Need help with virtial tree viewer [message #309479 is a reply to message #309471] Fri, 27 October 2006 18:18 Go to previous message
Robert Berger is currently offline Robert BergerFriend
Messages: 2
Registered: July 2009
Junior Member
I got the reveal() call to work by fixing a bug in my content provider's
getParent() method. However, reveal() with a model object as a parameter
is VERY slow; it seems to be doing a depth-first search, which negates the
performance advantage of SWT.VIRTUAL.

I suspect I need to pass a TreePath to reveal, but I can't get this to
work; the reveal() call does nothing. Is this form of reveal not supported
with SWT.VIRTUAL?
Previous Topic:Own PropertyPage for a java project isn't visible
Next Topic:Creating IFile and IFolder resources
Goto Forum:
  


Current Time: Sun Oct 06 16:25:35 GMT 2024

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

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

Back to the top