private void selectStubElement(StubElement<?> stubElement) {
    TreeNode node = TreeUtil.treeNodeTraverser(getRoot()).traverse().find(
      (treeNode) -> treeNode instanceof DefaultMutableTreeNode &&
                    ((StubTreeNode)((DefaultMutableTreeNode)treeNode).getUserObject()).getStub() == stubElement
    );
    if (node != null) {
      TreePath path = TreePathUtil.pathToTreeNode(node);
      myStubTree.getSelectionModel().setSelectionPath(path);
    }
  }
private void selectStubElement(StubElement<?> stubElement)