question: public void addUndoEvent ( UndoInterface event ) { if ( shouldProcessUndoRedoAction ( ) ) { boolean atEndOfList = ( currentIndex >= undoList . size ( ) ) ; if ( ! atEndOfList ) { while ( undoList . size ( ) > currentIndex ) { int lastIndex = undoList . size ( ) - 1 ; undoList . remove ( lastIndex ) ; } } undoList . add ( event ) ; currentIndex = undoList . size ( ) ; updateMenuItems ( ) ; logger . debug ( event . getStringRepresentation ( ) ) ; } }
target:  Adds the undo event.