I think this question is quite common.
Recently I have got a requirement that I need to make a leveled or expandable table-like view. If you need an example, you can refer to Mac OS X's Activity Monitor:
At the same time I tried an example here which meets my requirement quite a little: http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SWTTreeWithMulticolumns.htm
But it has some problems:
1. It's using SWT's Tree
class not JFace classes;
2. I think it needs a repeat implementation of some JFace viewer classes's functions such as sorting by clicking a column header, filter and so on.
While I was feeling desperate, I found that Eclipse itself has a perfect view, its "Problems" view:
So I think there must be a way to do it elegantly, for example extend JFace's TableViewer
or TreeViewer
class.
But I need help, since I've searched a lot in Google with no good result. :-(
That's simply a TreeViewer
. Note that you can add TreeViewerColumn
s to it.