After reading JavaDoc for ILazyTreeContentProvider and Virtual Tables and Trees I am a bit confused. Do they really mean that w开发者_Go百科ith a simple ITreeContentProvider all elements have to be loaded when the tree is created? I expected that getChildren()
would only be called when expanding an element (and hasChildren()
to be called to determine whether the plus sign should be shown). Or are they intended for the case where some elements have many children?
Found this:
Support for SWT.VIRTUAL trees - see bug 112000. Note that all along, TreeViewer implemented lazy trees: the tree content provider's getChildren() method is only called when the user expands a node. The virtual tree viewer is helpful if there are lots of children per parent, or if it expensive to compute the information needed for each child.
精彩评论