void () { Editor[] allEditors = EditorFactory.getInstance().getAllEditors(); for (Editor editor : allEditors) { final Project project = editor.getProject(); if (project != null) { PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (file != null) { DaemonCodeAnalyzer.getInstance(project).restart(file); } } } }