Search in sources :

Example 1 with CfmlFileType

use of com.intellij.coldFusion.model.files.CfmlFileType in project intellij-plugins by JetBrains.

the class CfmlErrorFilter method shouldHighlightErrorElement.

public boolean shouldHighlightErrorElement(@NotNull final PsiErrorElement element) {
    VirtualFile vFile = element.getContainingFile() != null ? element.getContainingFile().getVirtualFile() : null;
    if (!(vFile != null && vFile.getFileType() instanceof CfmlFileType)) {
        return true;
    }
    final Language language = element.getParent().getLanguage();
    if (language == CfmlLanguage.INSTANCE || language == HTMLLanguage.INSTANCE || language == SqlLanguage.INSTANCE)
        return true;
    return false;
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Language(com.intellij.lang.Language) SqlLanguage(com.intellij.sql.psi.SqlLanguage) HTMLLanguage(com.intellij.lang.html.HTMLLanguage) CfmlFileType(com.intellij.coldFusion.model.files.CfmlFileType)

Aggregations

CfmlFileType (com.intellij.coldFusion.model.files.CfmlFileType)1 Language (com.intellij.lang.Language)1 HTMLLanguage (com.intellij.lang.html.HTMLLanguage)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 SqlLanguage (com.intellij.sql.psi.SqlLanguage)1