Project: Eclipse_Platform_UI
Bug 101215 [Undo] Undo affecting outside files should allow "Cancel action"
Reported: 2005-06-22 06:03:27 | Status: verified fixed

In N20050622-0010. If, from an editor, I undo an action (such as a Java refactoring) that affected outside resources, I am told "Undoing {ACTION} affects elements outside of {RESOURCE}. Continue with undoing {ACTION}?" Yes will undo the change. No will remove the change from the Undo stack, replacing it with individual edits within the current editor. The few times that I've hit "No", what I've really meant is "Really? Let me check that out first." Unfortunately, hitting "No" is not undoable: I can't get back to the state where the refactoring is still on the undo stack and I still have the option to undo it. So I'd like a third option: Cancel will restore the state before the undo request was activated. That way, I could hit Cancel, figure out the extent of the change I'm undoing, and then decide to execute it anyway. Or not. Note that Cancel is actually equivalent to Undo > Yes > Redo, but I've never on the spur of the moment thought of that. Also, the buttons might need to be renamed. If "No" doesn't do what I expect, what would I by default make of "Yes / No / Cancel". Perhaps "Yes / Cancel Undo / Discard Change"?

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/NonLocalUndoUserApprover.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/OperationHistoryActionHandler.java