JFace: difference between ITreeContentProvider and ILazyTreeContentProvider

After reading the JavaDoc for ILazyTreeContentProvider and Virtual Tables and Trees I'm a bit confused. Does this really mean that with a simple ITreeContentProvider, all elements should be loaded when the tree is created? I expected getChildren() be called only when the element was expanded (and hasChildren() to call to determine if a plus sign should be shown). Or are they designed for the case when in some elements there are many children?

+4
source share
1 answer

Found this :

Support for SWT.VIRTUAL trees - see error 112000. Note that together TreeViewer implemented lazy trees: the getChildren () method of the content tree provider is called only when the user extends node. A virtual tree viewer is useful if there are many children per parent or if it is expensive for you to calculate the information needed for each child.

+6
source

Source: https://habr.com/ru/post/1307953/


All Articles