private static void addCommentToFold(@NotNull List<? super FoldingDescriptor> list,
                                       @NotNull PsiComment comment,
                                       @NotNull Document document,
                                       @NotNull Set<? super PsiElement> processedComments) {
    final FoldingDescriptor commentDescriptor = CommentFoldingUtil.getCommentDescriptor(comment, document, processedComments,
                                                                                        element -> isCustomRegionElement(element),
                                                                                        isCollapseCommentByDefault(comment));
    if (commentDescriptor != null) list.add(commentDescriptor);
  }
private static void addCommentToFold(@NotNull List<? super FoldingDescriptor> list,
                                       @NotNull PsiComment comment,
                                       @NotNull Document document,
                                       @NotNull Set<? super PsiElement> processedComments)