public static int getRowForNode(@NotNull JTree tree, @NotNull DefaultMutableTreeNode targetNode) {
    TreeNode[] path = targetNode.getPath();
    return tree.getRowForPath(new CachingTreePath(path));
  }
public static int getRowForNode(@NotNull JTree tree, @NotNull DefaultMutableTreeNode targetNode)