Skip to main content



      Home
Home » Eclipse Projects » JFace » DeferredContentProvider with TreeViewer(DeferredContentProvider with TreeViewer)
DeferredContentProvider with TreeViewer [message #669340] Mon, 09 May 2011 20:58 Go to next message
Eclipse UserFriend
I have a TreeViewer, in which I am trying to limit the count to 500 for performance reasons. My research showed that the DeferredContentProvider seemed to be the way to go. My research said that I would need to set the viewer's input to a IConcurrentModel and that I would need the SWT.Virtual flag on my viewer. I've done both of these, and it is still not limiting the count of items in my viewer. Any suggestions would be greatly appreciated!
Re: DeferredContentProvider with TreeViewer [message #669390 is a reply to message #669340] Tue, 10 May 2011 03:35 Go to previous message
Eclipse UserFriend
Hey Elizabeth,

that could be done with a "virtual" tree viewer when using a lazy content provider. You'll find a nice code snippet there:
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface. snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippe ts/viewers/Snippet030VirtualLazyTableViewer.java?view=markup
(And by the way: the JFace snippets page is a great resource. http://wiki.eclipse.org/JFaceSnippets)

IIRC, the crucial parts are
MyContentProvider implements ILazyContentProvider
v = new TableViewer(shell, SWT.VIRTUAL); and
v.setUseHashlookup(true).

Best
Carsten
Previous Topic:TableViewer setInput() questions
Next Topic:Table Viewer - How to control the Page Up and Page Down behavior
Goto Forum:
  


Current Time: Wed Jul 23 20:50:08 EDT 2025

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

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

Back to the top