How to create Filter for org.eclipse.jface.viewers.CheckboxTreeViewer?
I have to create Filter for my CheckboxTreeViewer. I'm not getting how to do that. I'm using following class
org.eclipse.pde.internal.ui.shared.FilteredCheckboxTree
and following way to get the FilteredCheckboxTree object:
FilteredTree ft = new FilteredCheckboxTree(parent, null, 0, null);
but it is telling me:
The constructor FilteredChe开发者_如何学运维ckboxTree(Composite, FormToolkit, int, PatternFilter) refers to the missing type FormToolkit.
I'm not getting what exactly the problem is. Please help if you know about it. Or if there is any other way to get Filter then do let me know.
Thanks in advance!!!
Add a dependency on
org.eclipse.ui.forms
(which containsFormToolkit
) to your plug-in.Much better, to avoid dependency on internal packages, use
org.eclipse.ui.dialogs.FilteredTree
and overridedoCreateTreeViewer
.
精彩评论