| « Java's File.renameTo fails on Windows | Integrating a better file comparer than clearcase offers » |
Automatically showing the Editor's file in Eclipse's Package Explorer
Searching on Google can be really easy as long as you pick the right words to search for. What if you’re not sure what you are looking for or what if you don’t know what the thing (or action) is called?
I was using Eclipse (the Java language editor) in its vanilla form and when I switched to Spring Tool Suite (STS) (which is a re-badged version of Eclipse) I found that the feature I thought was so useful had been switched off.
I knew the feature I wanted to switch on but I didn’t know what it was called! So I’m writing this article so that others might find it and not have to spend 2 weeks looking for it.
When the Eclipse feature is switched on, selecting a file to edit will open the representation of the file in the Package Explorer pane. As you open more files and switch to them in the editor pane, the focus moves in-line inside the Package Explorer.
This is called Linking or Link with Editor. You are linking the Package Explorer with the Editor pane. There is a double arrow icon at the top of the Package Explorer that toggles this behaviour: