// record the current valid state for the top operation in case it remains the
// top operation but changes state.
IUndoableOperation op= fHistory.getUndoOperation(fUndoContext);
boolean wasValid= false;
if (op != null)
wasValid= op.canUndo();
// Process the change, providing the before and after timestamps
processChange(event.getOffset(), event.getOffset() + event.getLength(), event.getText(), fReplacedText, fPreservedUndoModificationStamp, fPreservedRedoModificationStamp);
// now update fCurrent with the latest buffers from the document change.
fCurrent.pretendCommit();