I have a TreeViewer with TreeViewerColumns work fine.
I'd like to try using a FilteredTree.
I haven't yet found a way to do that, as FilteredTree apparently doesn't use a TreeColumnLayout(). I found some example code to handle that, but it just results in a blank view.
My original TreeViewer
tcl_composite = new TreeColumnLayout();
composite.setLayout(tcl_composite);
mtreeViewer = new TreeViewer(composite, SWT.BORDER | SWT.FULL_SELECTION);
What I tried replacing it with:
tcl_composite = new TreeColumnLayout();
mFilteredTree = new FilteredTree( composite, SWT.BORDER | SWT.FULL_SELECTION, new PatternFilter(), true){
@Override
protected Control createTreeControl(Composite parent, int style) {
Control c = super.createTreeControl(parent, style);
c.setLayoutData(null);
c.getParent().setLayout(tcl_composite);
return c;
}
};
mtreeViewer = mFilteredTree.getViewer();
So, how am I supposed to use TreeColumnViewers with a FilteredTree?