List<HighlightInfo> () { PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); IntList toIgnoreList = new IntArrayList(); if (!doFolding()) { toIgnoreList.add(Pass.UPDATE_FOLDING); } if (!doInspections()) { toIgnoreList.add(Pass.LOCAL_INSPECTIONS); toIgnoreList.add(Pass.WHOLE_FILE_LOCAL_INSPECTIONS); } int[] toIgnore = toIgnoreList.isEmpty() ? ArrayUtilRt.EMPTY_INT_ARRAY : toIgnoreList.toIntArray(); Editor editor = getEditor(); PsiFile file = getFile(); if (editor instanceof EditorWindow) { editor = ((EditorWindow)editor).getDelegate(); file = InjectedLanguageManager.getInstance(file.getProject()).getTopLevelFile(file); } return CodeInsightTestFixtureImpl.instantiateAndRun(file, editor, toIgnore, canChangeDocumentDuringHighlighting()); }