Bug 416761

Summary: Open File command should remember the last used folder across restarts
Product: [Eclipse Project] Platform Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, pavankumarleo
Version: 4.3Keywords: needinfo
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Sergey Prigogin CLA 2013-09-06 15:22:02 EDT
Quite often a user would like to open a file in the same folder as the one that is currently opened in the editor. Using File > Open File menu option opens the File Explorer in a constant folder (home directory, I think).   It is cumbersome to go to File > Properties, get the full path of the current file, then do File > Open File, paste the path, delete the trailing file name from the just-pasted path and click Ok.

Using the  "Link with Editor" with the Package Explorer or the Project explorer is not a good enough solution because the file that we are currently viewing may not be in the project. Adding a folder to the Eclipse project just because you may occasionally open files from it is too disruptive. A mechanism that just goes off the path of the current file would be most generic.

Ideally, File > Open File should open the Open File dialog in the same directory as the currently open file (Visual Studio does exactly this). If not, there should be an easy way to achieve this, even for files outside of the Eclipse workspace.
Comment 1 Dani Megert CLA 2013-09-09 10:11:15 EDT
(In reply to Sergey Prigogin from comment #0)
> Quite often a user would like to open a file in the same folder as the one
> that is currently opened in the editor. Using File > Open File menu option
> opens the File Explorer in a constant folder (home directory, I think). 

It opens in the directory that was used before, except after restart. I think we should improve that part and always remember the last used location. As for using the current editor input as folder location, I'm against it. It might feel right for some workflows but not others. In Eclipse the general policy is to remember/use previous dialog values.

Can you live with that Sergey?
Comment 2 Sergey Prigogin CLA 2013-09-09 14:26:42 EDT
(In reply to Dani Megert from comment #1)
> It opens in the directory that was used before, except after restart. I
> think we should improve that part and always remember the last used
> location. As for using the current editor input as folder location, I'm
> against it. It might feel right for some workflows but not others. In
> Eclipse the general policy is to remember/use previous dialog values.
> 
> Can you live with that Sergey?

Hesitantly I agree that opening of a neighbor file probably belongs to a separate command or some other new UI. Open File should be fixed to preserve the last used folder across restarts.
Comment 3 Pavan Adharapurapu CLA 2013-09-09 19:40:05 EDT
If opening last-opened directory is consistent with the way Eclipse does such things, then I agree it makes sense to not change it (and preserving it across restarts is good). However, I still think opening a file in the same folder as the currently-opened-file-in-editor is a frequently used operation and would benefit from an easily available option.