void () { registerInspection(new MyFileLevelInspection()); @Language("JAVA") String text = """ class X { void foo() { int XXX<caret>; } }"""; configureByText(JavaFileType.INSTANCE, text); assertEmpty(highlightErrors()); assertOneElement(myDaemonCodeAnalyzer.getFileLevelHighlights(getProject(), getFile())); type('2'); assertEmpty(highlightErrors()); assertOneElement(myDaemonCodeAnalyzer.getFileLevelHighlights(getProject(), getFile())); }