我创建TreeViewer
并PatternFilter
PatternFilter patternFilter = new PatternFilter();
FilteredTree filter = new FilteredTree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, patternFilter, true);
treeViewer = filter.getViewer();
treeViewer.setContentProvider(new TreeContentProvider());
treeViewer.setLabelProvider(new TreeLabelProvider());
treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
treeViewer.setInput(Activator.getDefault().getTreeModel());
Tree tree = treeViewer.getTree();
如何在过滤器的文本结果中添加粗体文本?
就像 Eclipse 中首选项对话框中的过滤器一样