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

Bug 406810

Summary: [sidebar] Renaming/deleting current file in sidebar navigator causes trouble
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Mike_Wilson
Version: 3.0   
Target Milestone: 3.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-04-29 11:39:40 EDT
1. Create some file like whatever.js ; open it in the editor page.
2. Use the sidebar to Actions > Rename "whatever.js" to something else
3. The editor input (hash) remains at whatever.js. At this point, if you save the editor, you'll get errors. If you reload the editor, you'll get an error message -- file not found.

In order to continue working you need to to set the editor to the new filename by clicking it in the LHS nav.

The sidebar should handle this case somehow and set the editor input to the new file.
Comment 1 Mark Macdonald CLA 2013-05-03 16:23:55 EDT
McQ says:

> If you delete a directory above the file you are editing, the file content stays in the editor, but you can't save it after that.

> either have to make "Save" in the editor put the file (and any missing parent directories) back, or you have to clear the edit context when the directory is deleted. 
> (I prefer the latter)
Comment 2 Mark Macdonald CLA 2013-05-14 19:20:35 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3ebbcbf

If you rename the current file being edited, it is now smart enough to redirect you to the file under its new name. If you delete the file or an ancestor of it, you get an empty right-hand pane.