TreePath (@NotNull PresentableNodeDescriptor node) { AbstractTreeBuilder builder = AbstractTreeBuilder.getBuilderFor(this); DefaultMutableTreeNode treeNode = builder.getNodeForElement(node); return treeNode != null ? new TreePath(treeNode.getPath()) : new TreePath(node); }