Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323058

Summary: Project Explorer - Undo and redo does not restore the original file
Product: [Eclipse Project] Platform Reporter: Gary <gary.yund>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Gary CLA 2010-08-18 12:03:52 EDT
If you accidentally have Project explorer selected in Eclipse and you create a new file. If you update the file, click on the project explorer tab / files inside it, then hit control+Z to undo (which will delete the last created file) then hit control+Y to redo the operation, the file you redo the operation will be blank (in case of a new file) or contain the text of the file you copied this from.

The solution to this problem needs to save the contents of the new file when undoing, and restore the contents of the file when redoing. Otherwise, you can lose lots of work from an accidental mistake of undoing with the wrong window context selected.


-- Configuration Details --
Product: Eclipse 1.3.0.20100617-0520 (org.eclipse.epp.package.modeling.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY
Comment 1 Gary CLA 2010-08-18 12:06:54 EDT
Clarification: This happens when copying from an existing file. When you perform the undo/redo operation, it copies the contents of the file currently saved on disk, not a cached version.
Comment 2 Eric Moffatt CLA 2010-08-24 14:14:21 EDT
Francis, if this is an issue with the resource management just punt it back with a pointer to the broken code and I'll re-triage it...
Comment 3 Francis Upton IV CLA 2011-04-21 03:30:25 EDT
(In reply to comment #2)
> Francis, if this is an issue with the resource management just punt it back
> with a pointer to the broken code and I'll re-triage it...

Yeah, I don't see how this is CNF, I think this might be LTK/resources. I would start with LTK.
Comment 4 Eclipse Genie CLA 2019-06-01 14:06:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.