Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » DeferredContentProvider with TreeViewer(DeferredContentProvider with TreeViewer)
DeferredContentProvider with TreeViewer [message #669340] Tue, 10 May 2011 00:58 Go to next message
Elizabeth  is currently offline Elizabeth Friend
Messages: 13
Registered: December 2009
Junior Member
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 07:35 Go to previous message
Carsten Habicht is currently offline Carsten HabichtFriend
Messages: 14
Registered: January 2011
Junior Member
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: Thu Apr 18 01:42:06 GMT 2024

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

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

Back to the top