A.Goel
A.Goel

Reputation: 111

How to expand a FilteredTree after the filteration?

I have used a filtered tree in order to filter the contents. If filter text is having some text, in this case tree is expanding properly. But If the filter text is empty, then tree is not expanding at all.

Can some one guide me how to expand the filter tree if I the filter text becomes empty?

Also, In the beginning when Tree is having lot of data and I am expanding it by treeViewer.expandAll() then it takes lot of time to open the dialog. So, how to handle that performance?

Code Sample

FilteredTree filterTree = new FilteredTree(parent, SWT.VIRTUAL | SWT.BORDER, new PatternFilter());
filterTree.setQuickSelectionMode(true);
treeViewer = filterTree.getViewer();
treeViewer.setContentProvider(contentProvider);
treeViewer.setInput(input);
treeViewer.setLabelProvider(new LabelProvider());
treeViewer.expandAll();

Upvotes: 0

Views: 84

Answers (0)

Related Questions