List<HighlightInfo> (@NotNull VirtualFile virtualFile) { PsiDocumentManager documentManager = PsiDocumentManager.getInstance(getProject()); documentManager.commitAllDocuments(); FileEditor fileEditor = FileEditorManagerEx.getInstanceEx(getProject()).openFile(virtualFile, false)[0]; Editor editor = ((TextEditor)fileEditor).getEditor(); PsiFile file = documentManager.getPsiFile(editor.getDocument()); List<HighlightInfo> infos = CodeInsightTestFixtureImpl.instantiateAndRun(file, editor, new int[0], false); myWolfTheProblemSolver.waitForFilesQueuedForInvalidationAreProcessed(); return filter(infos, HighlightSeverity.ERROR); }