private static int getLastCommandTimestamp(@NotNull ClientState state, @NotNull DocumentReference ref) {
    return Math.max(state.myUndoStacksHolder.getLastCommandTimestamp(ref), state.myRedoStacksHolder.getLastCommandTimestamp(ref));
  }
private static int getLastCommandTimestamp(@NotNull ClientState state, @NotNull DocumentReference ref)