use of com.intellij.ide.highlighter.custom.CustomFileHighlighter in project intellij-community by JetBrains.
the class CustomFileTypeFoldingBuilder method buildLanguageFoldRegions.
@Override
protected void buildLanguageFoldRegions(@NotNull List<FoldingDescriptor> descriptors, @NotNull PsiElement root, @NotNull Document document, boolean quick) {
FileType fileType = root.getContainingFile().getFileType();
if (!(fileType instanceof CustomSyntaxTableFileType)) {
return;
}
CustomFileHighlighter highlighter = new CustomFileHighlighter(((CustomSyntaxTableFileType) fileType).getSyntaxTable());
buildBraceMatcherBasedFolding(descriptors, root, document, highlighter);
}
Aggregations