@Override
  public FoldingDescriptor @NotNull [] buildFoldRegions(@NotNull PsiElement root, @NotNull Document document, boolean quick) {
    List<FoldingDescriptor> descriptors = new ArrayList<>();
    Set<TextRange> rangesCoveredByDescriptors = new HashSet<>();

    PsiFile containingFile = PsiUtilCore.getTemplateLanguageFile(root);
    for (FoldingBuilder builder : DumbService.getInstance(root.getProject()).filterByDumbAwareness(myBuilders)) {
      for (FoldingDescriptor descriptor : LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(builder, root, document, quick)) {
        PsiElement descriptorPsi = descriptor.getElement().getPsi();
        if (descriptorPsi != null) {
          assertSameFile(containingFile, descriptor, descriptorPsi, builder);
        }
        if (rangesCoveredByDescriptors.add(descriptor.getRange())) {
          descriptors.add(new FoldingDescriptorWrapper(descriptor, builder));
        }
      }
    }

    return descriptors.toArray(FoldingDescriptor.EMPTY_ARRAY);
  }
@Override
  public FoldingDescriptor @NotNull [] buildFoldRegions(@NotNull PsiElement root, @NotNull Document document, boolean quick)