void (@NotNull PsiFile psiFile, @NotNull Editor editor) { IdentifierHighlighterPass pass = new IdentifierHighlighterPassFactory().createHighlightingPass(psiFile, editor, psiFile.getTextRange()); assert pass != null; try { ReadAction.nonBlocking(() -> { DaemonProgressIndicator indicator = new DaemonProgressIndicator(); ProgressManager.getInstance().runProcess(() -> { HighlightingSessionImpl.runInsideHighlightingSession(psiFile, editor.getColorsScheme(), ProperTextRange.create(psiFile.getTextRange()), false, session -> { pass.doCollectInformation(session); }); }, indicator); }).submit(AppExecutorUtil.getAppExecutorService()).get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } }