[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: ILazyTreeContentProvider and the plus-sign

Hi Markus,

You should use: ThreeViewer.setHasChildren(final Object elementOrTreePath, final boolean hasChildren)
Cite from javadoc:"For a TreeViewer with a tree with the VIRTUAL style bit set, inform the viewer about whether the given element or tree path has children. Avoid calling this method if the number of children has already been set."


Regards,
Pavel


"Markus Thielen" <mt@xxxxxxxxx> wrote in message news:43a3ce586ff4a86529d337051ba18a71$1@xxxxxxxxxxxxxxxxxx
Hi,
I really didnt figure out how to use the ILazyTreeContentProvider without knowing if an element has children. I would like to do the same as with ITreeContentProvider, where there is a method hasChildren() which only gets triggered when the user pushes the plus-sign.
I can force the plus sign with the ILazyTreeContentProvider with calling updateChildCount(element, 1) and replace the nodes within some events. But this way the tree gets unbelievable slow. I cant imagine that there is no way to use the ILazyTreeContentProvider without setting the children count but having the plus sign shown. Any ideas?


Thanks for any help!
Markus