boolean (@NotNull AbstractTreeNode node, @NotNull Object element) { if (node instanceof SummaryNode || node instanceof ToDoRootNode) return true; if (node instanceof ProjectViewNode) { if (myFile == null) { return TodoTreeHelper.getInstance(node.getProject()).contains((ProjectViewNode)node, element); } } return node instanceof BaseToDoNode && ((BaseToDoNode<?>)node).contains(element) || node instanceof ProjectViewNode && ((ProjectViewNode<?>)node).contains(myFile); }