@Override
  public void highlightsInsideVisiblePartAreProduced(@NotNull HighlightingSession session,
                                                     @Nullable Editor editor,
                                                     @NotNull List<? extends HighlightInfo> infos,
                                                     @NotNull TextRange priorityRange,
                                                     @NotNull TextRange restrictRange,
                                                     int groupId) {
    PsiFile psiFile = session.getPsiFile();
    Project project = session.getProject();
    Document document = session.getDocument();
    long modificationStamp = document.getModificationStamp();
    TextRange priorityIntersection = priorityRange.intersection(restrictRange);
    if (priorityIntersection != null) {
      MarkupModelEx markupModel = (MarkupModelEx)DocumentMarkupModel.forDocument(document, project, true);
      BackgroundUpdateHighlightersUtil.setHighlightersInRange(priorityIntersection, new ArrayList<HighlightInfo>(infos), markupModel, groupId, session);
    }
    TextEditorHighlightingPass showAutoImportPass = editor == null ? null : getOrCreateShowAutoImportPass(editor, psiFile, session.getProgressIndicator());
    ApplicationManager.getApplication().invokeLater(() -> {
      if (editor != null && !editor.isDisposed() && modificationStamp == document.getModificationStamp()) {
        // usability: show auto import popup as soon as possible
        if (!DumbService.isDumb(project)) {
          showAutoImportHints(session.getProgressIndicator(), showAutoImportPass);
        }

        DaemonCodeAnalyzerImpl.repaintErrorStripeAndIcon(editor, project, psiFile);
      }
    });
  }
@Override
  public void highlightsInsideVisiblePartAreProduced(@NotNull HighlightingSession session,
                                                     @Nullable Editor editor,
                                                     @NotNull List<? extends HighlightInfo> infos,
                                                     @NotNull TextRange priorityRange,
                                                     @NotNull TextRange restrictRange,
                                                     int groupId)