private boolean collectHighlights(@NotNull List<? extends PsiElement> elements1,
                                    @NotNull LongList ranges1,
                                    @NotNull List<? extends PsiElement> elements2,
                                    @NotNull LongList ranges2,
                                    HighlightVisitor @NotNull [] visitors,
                                    boolean forceHighlightParents,
                                    @NotNull TriConsumer<Object, ? super PsiElement, ? super List<? extends HighlightInfo>> resultSink) {
    int chunkSize = Math.max(1, (elements1.size()+elements2.size()) / 100); // one percent precision is enough
    BooleanSupplier runnable = () -> myHighlightVisitorRunner.runVisitors(getFile(), myRestrictRange, elements1, ranges1, elements2, ranges2, visitors, forceHighlightParents, chunkSize,
                                                                          myUpdateAll, () -> createInfoHolder(getFile()), resultSink);
    AnnotationSession session = AnnotationSessionImpl.create(getFile());
    setupAnnotationSession(session, myPriorityRange, myRestrictRange,
                           ((HighlightingSessionImpl)getHighlightingSession()).getMinimumSeverity());
    AnnotatorRunner annotatorRunner = myRunAnnotators ? new AnnotatorRunner(getFile(), false, session) : null;
    return annotatorRunner == null ? runnable.getAsBoolean() : annotatorRunner.runAnnotatorsAsync(elements1, elements2, runnable, resultSink);
  }
private boolean collectHighlights(@NotNull List<? extends PsiElement> elements1,
                                    @NotNull LongList ranges1,
                                    @NotNull List<? extends PsiElement> elements2,
                                    @NotNull LongList ranges2,
                                    HighlightVisitor @NotNull [] visitors,
                                    boolean forceHighlightParents,
                                    @NotNull TriConsumer<Object, ? super PsiElement, ? super List<? extends HighlightInfo>> resultSink)