void (final @NotNull Project project) { ApplicationManager.getApplication().runWriteAction(() -> { for (Editor editor : EditorFactory.getInstance().getAllEditors()) { if (editor instanceof EditorEx && editor.getProject() == project) { final VirtualFile vFile = editor.getVirtualFile(); if (vFile != null) { final EditorHighlighter highlighter = EditorHighlighterFactory.getInstance().createEditorHighlighter(project, vFile); ((EditorEx)editor).setHighlighter(highlighter); } } } }); }