/** * Commits the current change into this command. */ protected void commit() { if (fStart < 0) { if (fFoldingIntoCompoundChange) { fCurrent= createCurrent(); } else { reinitialize(); } } else { updateCommand(); fCurrent= createCurrent(); } resetProcessChangeSate(); }
/** * Commits the current change into this command. */ protected void commit() { if (fStart < 0) { if (fFoldingIntoCompoundChange) { fCurrent= createCurrent(); } else { reinitialize(); } } else { updateCommand(); fCurrent= createCurrent(); } resetProcessChangeSate(); }
@Override protected void updateCommand() { // first gather the data from the buffers super.updateCommand(); // the result of the command update is stored as a child command TextCommand c= new TextCommand(fUndoContext); c.fStart= fStart; c.fEnd= fEnd; c.fText= fText; c.fPreservedText= fPreservedText; c.fUndoModificationStamp= fUndoModificationStamp; c.fRedoModificationStamp= fRedoModificationStamp; add(c); // clear out all indexes now that the child is added reinitialize(); }
@Override protected void updateCommand() { // first gather the data from the buffers super.updateCommand(); // the result of the command update is stored as a child command TextCommand c= new TextCommand(fUndoContext); c.fStart= fStart; c.fEnd= fEnd; c.fText= fText; c.fPreservedText= fPreservedText; c.fUndoModificationStamp= fUndoModificationStamp; c.fRedoModificationStamp= fRedoModificationStamp; add(c); // clear out all indexes now that the child is added reinitialize(); }