protected List<Block> buildTemplateLanguageBlocksInside(@NotNull PsiFile templateFile,
                                                        @NotNull TextRange range,
                                                        CodeStyleSettings settings,
                                                        XmlFormattingPolicy xmlFormattingPolicy,
                                                        Indent childrenIndent) throws FragmentedTemplateException {
    List<Block> templateBlocks = new ArrayList<>();
    TemplateLanguageFileViewProvider viewProvider = (TemplateLanguageFileViewProvider)templateFile.getViewProvider();
    List<PsiElement> templateElements = getTemplateElements(range, viewProvider);
    FormattingModel localModel = createTemplateFormattingModelInternal(templateFile, settings, xmlFormattingPolicy, templateElements, childrenIndent);
    if (localModel != null) {
      Block rootBlock = localModel.getRootBlock();
      if (rootBlock instanceof CompositeTemplateBlock) {
        templateBlocks.addAll(rootBlock.getSubBlocks());
      }
      else {
        templateBlocks.add(rootBlock);
      }
    }
    return templateBlocks;
  }
protected List<Block> buildTemplateLanguageBlocksInside(@NotNull PsiFile templateFile,
                                                        @NotNull TextRange range,
                                                        CodeStyleSettings settings,
                                                        XmlFormattingPolicy xmlFormattingPolicy,
                                                        Indent childrenIndent)