Skip to content

Instantly share code, notes, and snippets.

@rubenquadros
Created May 1, 2022 19:01
Show Gist options
  • Save rubenquadros/d9f11d8066af0675076dc802ba53940e to your computer and use it in GitHub Desktop.
Save rubenquadros/d9f11d8066af0675076dc802ba53940e to your computer and use it in GitHub Desktop.
Ignore the inspection for this file
fun ignoreInspection(
fileEditor: FileEditor,
psiFile: PsiFile,
project: Project
) {
if (isErrorHighlighted(psiFile, project)) {
HighlightLevelUtil.forceRootHighlighting(
psiFile,
FileHighlightingSetting.SKIP_HIGHLIGHTING
)
//remove notfication if it is displayed
removeNotification(fileEditor)
}
InjectedLanguageManager.getInstance(project).dropFileCaches(psiFile)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment