[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] TreeViewer with visible root
|
I'm having a problem with TreeViewer when I want the root node of the model
to be visible (root being the node that doesn't have any parents). Expanding
the root node always shows the root node as a child. For example, if I
expand root, I see root, root. If I expand that, I see root, root, root,
etc.
>From debugging the code, it looks like the structured viewer ultimately
calls getElements(), rather than getChildren(), when getting children for
the root. Since I want the root to be visible, getElements() returns root,
hence the root, root, root, etc. Is there a restriction on TreeViewer that
the root can't be visible?