A concrete viewer based on an SWT
Tree
control.
This class is not intended to be subclassed outside the viewer framework. It is designed to be instantiated with a pre-existing SWT tree control and configured with a domain-specific content provider, label provider, element filter (optional), and element sorter (optional).
As of 3.2, TreeViewer supports multiple equal elements (each with a different parent chain) in the tree. This support requires that clients enable the element map by calling setUseHashLookup(true)
.
Content providers for tree viewers must implement either the {@link ITreeContentProvider} interface, (as of 3.2) the{@link ILazyTreeContentProvider} interface, or (as of 3.3) the{@link ILazyTreePathContentProvider}. If the content provider is an ILazyTreeContentProvider
or an ILazyTreePathContentProvider
, the underlying Tree must be created using the {@link SWT#VIRTUAL} style bit, the tree viewer will notsupport sorting or filtering, and hash lookup must be enabled by calling {@link #setUseHashlookup(boolean)}.
Users setting up an editable tree with more than 1 column have to pass the SWT.FULL_SELECTION style bit
@noextend This class is not intended to be subclassed by clients.