private static void addCommentsToFold(@NotNull List<? super FoldingDescriptor> list,
                                        @NotNull PsiElement element,
                                        @NotNull Document document,
                                        @NotNull Set<? super PsiElement> processedComments) {
    final PsiComment[] comments = PsiTreeUtil.getChildrenOfType(element, PsiComment.class);
    if (comments == null) return;

    for (PsiComment comment : comments) {
      addCommentToFold(list, comment, document, processedComments);
    }
  }
private static void addCommentsToFold(@NotNull List<? super FoldingDescriptor> list,
                                        @NotNull PsiElement element,
                                        @NotNull Document document,
                                        @NotNull Set<? super PsiElement> processedComments)