Eclipse: Get location of the current file?
What you're looking for is the 'Properties' dialogue for the current file. This can be activated in two ways:
- Selecting from the menu: File -> Properties
- Using the shortcut: Alt + Enter
This gives you a dialogue which contains both the full path of the document, as well as the relative path from the workspace root.
The dialogue can be quite handy: it allows you to highlight and copy the file path.
The other solution ("File-->Properties" or "Alt+Enter") didn't work for me.
I use:
- Right Click (in current editor) --> Show In (shortcut: Alt+Shift+W) --> Project Explorer
This shows in Project Explorer the location of the file. If the file is a class in a referenced library, the dependency tree is automatically opened.
Use the Eclipse menu:
File->Properties
or the shortcut:
Alt-Enter
You should be able to see the Location associated with the Resource
Just hit Alt-Enter.