public static boolean isBulkExpandCollapseSupported(@NotNull JTree tree) {
    return Tree.isBulkExpandCollapseSupported() && tree instanceof Tree;
  }
public static boolean isBulkExpandCollapseSupported(@NotNull JTree tree)