Search in sources :

Example 1 with OxyTemplateFileType

use of ool.intellij.plugin.file.type.OxyTemplateFileType in project oxy-template-support-plugin by mutant-industries.

the class MatchingTagsAndJsBlock method buildLanguageFoldRegions.

@Override
protected void buildLanguageFoldRegions(@NotNull List<FoldingDescriptor> descriptors, @NotNull PsiElement root, @NotNull Document document, boolean quick) {
    PsiFile file = root.getContainingFile();
    FileType fileType = file.getFileType();
    if (!(fileType instanceof OxyTemplateFileType)) {
        return;
    }
    buildBraceMatcherBasedFolding(descriptors, root, document, new OxyTemplateSyntaxHighlighter());
}
Also used : OxyTemplateFileType(ool.intellij.plugin.file.type.OxyTemplateFileType) OxyTemplateFileType(ool.intellij.plugin.file.type.OxyTemplateFileType) FileType(com.intellij.openapi.fileTypes.FileType) OxyTemplateSyntaxHighlighter(ool.intellij.plugin.editor.highlighter.OxyTemplateSyntaxHighlighter) PsiFile(com.intellij.psi.PsiFile)

Aggregations

FileType (com.intellij.openapi.fileTypes.FileType)1 PsiFile (com.intellij.psi.PsiFile)1 OxyTemplateSyntaxHighlighter (ool.intellij.plugin.editor.highlighter.OxyTemplateSyntaxHighlighter)1 OxyTemplateFileType (ool.intellij.plugin.file.type.OxyTemplateFileType)1