void () { @Language("JAVA") String text = "class EEE { void f(){} }"; VirtualFile excluded = configureByText(JavaFileType.INSTANCE, text).getVirtualFile(); PsiTestUtil.addExcludedRoot(myModule, excluded.getParent()); configureByText(JavaFileType.INSTANCE, "class X { <caret> }"); assertEmpty(highlightErrors()); FileStatusMap me = DaemonCodeAnalyzerEx.getInstanceEx(getProject()).getFileStatusMap(); TextRange scope = me.getFileDirtyScope(getEditor().getDocument(), getFile(), Pass.UPDATE_ALL); assertNull(scope); WriteCommandAction.runWriteCommandAction(getProject(), () -> ((PsiJavaFile)PsiManager.getInstance(myProject).findFile(excluded)).getClasses()[0].getMethods()[0].delete()); UIUtil.dispatchAllInvocationEvents(); scope = me.getFileDirtyScope(getEditor().getDocument(), getFile(), Pass.UPDATE_ALL); assertNull(scope); }