private void highlightHyperlinksAndFoldings(int startLine, @NotNull Expirable expirableToken) {
    ThreadingAssertions.assertEventDispatchThread();
    CompositeFilter compositeFilter = createCompositeFilter();
    boolean canHighlightHyperlinks = !compositeFilter.isEmpty();

    if (!canHighlightHyperlinks && !myUpdateFoldingsEnabled) {
      return;
    }
    Document document = getEditor().getDocument();
    if (document.getTextLength() == 0) return;

    int endLine = Math.max(0, document.getLineCount() - 1);

    if (canHighlightHyperlinks) {
      getHyperlinks().highlightHyperlinksLater(compositeFilter, startLine, endLine, expirableToken);
    }

    if (myAllowHeavyFilters && compositeFilter.isAnyHeavy() && compositeFilter.shouldRunHeavy()) {
      runHeavyFilters(compositeFilter, startLine, endLine);
    }
    if (myUpdateFoldingsEnabled) {
      updateFoldings(startLine, endLine);
    }
  }
private void highlightHyperlinksAndFoldings(int startLine, @NotNull Expirable expirableToken)