Search in sources :

Example 1 with TextEditorHighlightingPassRegistrarEx

use of com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarEx in project intellij-community by JetBrains.

the class SpellcheckerPerformanceTest method runLocalInspections.

@NotNull
private List<HighlightInfo> runLocalInspections() {
    myFixture.enableInspections(getInspectionTools());
    TextEditorHighlightingPassRegistrarEx passRegistrar = TextEditorHighlightingPassRegistrarEx.getInstanceEx(getProject());
    List<TextEditorHighlightingPass> passes = passRegistrar.instantiatePasses(myFixture.getFile(), myFixture.getEditor(), new int[0]);
    int[] toIgnore = passes.stream().mapToInt(TextEditorHighlightingPass::getId).toArray();
    int i = ArrayUtil.find(toIgnore, Pass.LOCAL_INSPECTIONS);
    // ignore everything except Pass.LOCAL_INSPECTIONS
    toIgnore[i] = 0;
    return CodeInsightTestFixtureImpl.instantiateAndRun(myFixture.getFile(), myFixture.getEditor(), toIgnore, false);
}
Also used : TextEditorHighlightingPass(com.intellij.codeHighlighting.TextEditorHighlightingPass) TextEditorHighlightingPassRegistrarEx(com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarEx) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

TextEditorHighlightingPass (com.intellij.codeHighlighting.TextEditorHighlightingPass)1 TextEditorHighlightingPassRegistrarEx (com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarEx)1 NotNull (org.jetbrains.annotations.NotNull)1