void (@NotNull ExpectedHighlightingData data, String filePath) { data.init(); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); //noinspection ResultOfMethodCallIgnored getFile().getText(); //to load text myJavaFilesFilter.allowTreeAccessForFile(getVFile()); PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myJavaFilesFilter, getTestRootDisposable()); try { Collection<HighlightInfo> infos = doHighlighting(); data.checkResult(getFile(), infos, getEditor().getDocument().getText(), filePath); } finally { PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); } }