@Override public IStatus undo(IProgressMonitor monitor, IAdaptable uiInfo) { resetProcessChangeSate(); int size= fCommands.size(); if (size > 0) { TextCommand c; for (int i= size -1; i > 0; --i) { c= fCommands.get(i); c.undoTextChange(); } c= fCommands.get(0); c.undo(monitor, uiInfo); } return Status.OK_STATUS; }
@Override public IStatus undo(IProgressMonitor monitor, IAdaptable uiInfo) { resetProcessChangeSate(); int size= fCommands.size(); if (size > 0) { TextCommand c; for (int i= size -1; i > 0; --i) { c= fCommands.get(i); c.undoTextChange(); } c= fCommands.get(0); c.undo(monitor, uiInfo); } return Status.OK_STATUS; }
/** * Undo the change described by this command. Also selects and * reveals the change. * * @param monitor the progress monitor to use if necessary * @param uiInfo an adaptable that can provide UI info if needed * @return the status */ @Override public IStatus undo(IProgressMonitor monitor, IAdaptable uiInfo) { if (isValid()) { undoTextChange(); selectAndReveal(fStart, fPreservedText == null ? 0 : fPreservedText.length()); resetProcessChangeSate(); return Status.OK_STATUS; } return IOperationHistory.OPERATION_INVALID_STATUS; }
/** * Undo the change described by this command. Also selects and * reveals the change. * * @param monitor the progress monitor to use if necessary * @param uiInfo an adaptable that can provide UI info if needed * @return the status */ @Override public IStatus undo(IProgressMonitor monitor, IAdaptable uiInfo) { if (isValid()) { undoTextChange(); selectAndReveal(fStart, fPreservedText == null ? 0 : fPreservedText.length()); resetProcessChangeSate(); return Status.OK_STATUS; } return IOperationHistory.OPERATION_INVALID_STATUS; }