void (@NotNull Collection<? super Editor> applied, @NotNull Collection<? super Editor> collected) { class Fac implements TextEditorHighlightingPassFactory { @Override public TextEditorHighlightingPass createHighlightingPass(@NotNull PsiFile file, @NotNull Editor editor) { return new EditorBoundHighlightingPass(editor, file, false) { @Override public void doCollectInformation(@NotNull ProgressIndicator progress) { collected.add(editor); } @Override public void doApplyInformationToEditor() { applied.add(editor); } }; } } TextEditorHighlightingPassRegistrar registrar = TextEditorHighlightingPassRegistrar.getInstance(getProject()); registrar.registerTextEditorHighlightingPass(new Fac(), null, null, false, -1); }