question: synchronized void executed ( RTEditText editor , Operation op ) { Stack < Operation > undoStack = getUndoStack ( editor ) ; Stack < Operation > redoStack = getRedoStack ( editor ) ; while ( ! undoStack . empty ( ) && op . canMerge ( undoStack . peek ( ) ) ) { Operation previousOp = undoStack . pop ( ) ; op . merge ( previousOp ) ; } push ( op , undoStack ) ; redoStack . clear ( ) ; }
target:  Call this when an operation is performed to add it to the undo stack.