@Nullable
  @ApiStatus.Internal
  public ResetUndoHistoryToken createResetUndoHistoryToken(@NotNull FileEditor editor) {
    Collection<DocumentReference> references = getDocumentReferences(editor);
    if (references.size() != 1)
      return null;

    DocumentReference reference = references.iterator().next();
    LocalUndoRedoSnapshot snapshot = getUndoRedoSnapshotForDocument(reference);
    if (snapshot == null) return null;

    return new ResetUndoHistoryToken(this, snapshot, reference);
  }
@Nullable
  @ApiStatus.Internal
  public ResetUndoHistoryToken createResetUndoHistoryToken(@NotNull FileEditor editor)