code: public void clear(boolean undoAll) {
      LOGGER.trace("Clear called, with undoAll: " + undoAll);
      if (undoAll) {
        undoAll();
      }
      LOGGER.trace("Clearing changes");
      changes.clear();
      position.set(-1);
      validPosition.set(-1);
    }
docs: Clears the change history.
  
  @param undoAll if true, will undo all changes before clearing