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

Bug 406667

Summary: Cancelling a change before auto save can overwrite file contents
Product: [ECD] Orion Reporter: Ken Walker <ken_walker>
Component: EditorAssignee: Bogdan Gheorghe <gheorghe>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: Silenio_Quarti
Version: 2.0   
Target Milestone: 3.0 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Ken Walker CLA 2013-04-26 10:05:05 EDT
In the new nav/editor page with auto-save turned on.

have at least two files visible in the navigator pane.

Click on one to see the contents.  Now hover the mouse over the second one ready to click it.

Type some text but before autosave can be triggered, click the second file.

You will get a Save Changes dialog because the editor is dirty.

If you pick "cancel", the second file is going to be overwritten with the first files contents.  This might be related to the fact that the HASH is changed to contain the second file name?
Comment 1 Bogdan Gheorghe CLA 2013-04-26 12:28:11 EDT
We don't actually get rid of the contents of the second file - but we get into a bad state where we can't switch files from the navigator. This has everything to do with the way we are setting input in the InputManager, which really needs a good scrubbing. 

This test case also exposed another bug - you can get into an out of sync situation if autosave tries to save again before the first save goes through. That needs to be protected against as well (filed Bug 406687).

Fix is underway.