I’m working on a plugin and there’s a view which has a treeviewer.
I want to add nodes to that tree diagrammatically as these nodes are not children for input object (treeviewer.setInput(input object)
example:
I have x and y objects, and they are unrelated
x has child object x1 and child object x2
if I set the input for the tree viewer to x so i’ll get x1 and x2 in my tree as they’re its children
now, How can I add object y to this tree as a tree node while it has no relation with x
Thanks
You can have multiple root objects in a
TreeViewer. You can get this byArrayContentProvideras the content provider of the treeList