public void updateCurrentState(String whatHappened){
  UndoEvent undoEvent=createUndoEventForCurrentState(whatHappened);
  if (undoEvent != null && undoStack != null) {
    undoStack.setTheWayThingsAre(undoEvent);
  }
}

public void updateCurrentState ( String whatHappened ) { UndoEvent undoEvent = createUndoEventForCurrentState ( whatHappened ) ; if ( undoEvent != null && undoStack != null ) { undoStack . setTheWayThingsAre ( undoEvent ) ; } }
called by anything that knows that the eomg has arrived at a stable state that should be kept for undo actions .
