/** * 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; }
/** * Re-applies the change described by this command that previously been * rolled back. 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 redo(IProgressMonitor monitor, IAdaptable uiInfo) { if (isValid()) { redoTextChange(); resetProcessChangeSate(); selectAndReveal(fStart, fText == null ? 0 : fText.length()); return Status.OK_STATUS; } return IOperationHistory.OPERATION_INVALID_STATUS; }
/** * Re-applies the change described by this command that previously been * rolled back. 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 redo(IProgressMonitor monitor, IAdaptable uiInfo) { if (isValid()) { redoTextChange(); resetProcessChangeSate(); selectAndReveal(fStart, fText == null ? 0 : fText.length()); return Status.OK_STATUS; } return IOperationHistory.OPERATION_INVALID_STATUS; }