private static @NotNull List<HighlightInfo> getVisibleHighlights(@NotNull TextRange visibleRange,
                                                                   @NotNull Project project,
                                                                   @NotNull Editor editor,
                                                                   boolean isDirty) {
    List<HighlightInfo> highlights = new ArrayList<>();
    int offset = editor.getCaretModel().getOffset();
    DaemonCodeAnalyzerEx.processHighlights(editor.getDocument(), project, null, visibleRange.getStartOffset(), visibleRange.getEndOffset(), info -> {
      //no changes after escape => suggest imports under caret only
      if (!isDirty && !info.containsOffset(offset, true)) {
        return true;
      }
      if (info.hasHint() && !editor.getFoldingModel().isOffsetCollapsed(info.startOffset)) {
        highlights.add(info);
      }
      return true;
    });
    return highlights;
  }
private static @NotNull List<HighlightInfo> getVisibleHighlights(@NotNull TextRange visibleRange,
                                                                   @NotNull Project project,
                                                                   @NotNull Editor editor,
                                                                   boolean isDirty)