1
我想在匹配的编辑器被激活时选择treenode。Jface TreeViewer setSelection
这是代码:
private void selectNodeInTree(IEditorPart activatedEditor) {
IEditorInput input = activatedEditor.getEditorInput();
StructuredSelection selection = new StructuredSelection(input); //Selection is not null!
treeViewer.setSelection(selection, true);
}
但什么也没有选择,我缺少什么?