@ApiStatus.Internal
  public @NotNull OffsetMap copyOffsets(@NotNull Document anotherDocument) {
    if (anotherDocument.getTextLength() != myDocument.getTextLength()) {
      LOG.error("Different document lengths: " + myDocument.getTextLength() +
                " for " + myDocument +
                " and " + anotherDocument.getTextLength() +
                " for " + anotherDocument);
    }
    return mapOffsets(anotherDocument, Function.identity());
  }
@ApiStatus.Internal
  public @NotNull OffsetMap copyOffsets(@NotNull Document anotherDocument)