开发者

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!!!


  1. Add a dependency on org.eclipse.ui.forms (which contains FormToolkit) to your plug-in.

  2. Much better, to avoid dependency on internal packages, use org.eclipse.ui.dialogs.FilteredTree and override doCreateTreeViewer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜