private static void selectPreviousSibling(@NotNull JTree tree) {
    TreePath sibling = TreeUtil.previousVisibleSibling(tree, tree.getLeadSelectionPath());
    if (sibling == null) return; // previous sibling is not found
    tree.setSelectionPath(sibling);
    TreeUtil.scrollToVisible(tree, sibling, false);
  }
private static void selectPreviousSibling(@NotNull JTree tree)