Reputation: 154494
If I've got a file open in Eclipse, how can I figure out where it is on the filesystem?
For example, in Vim I would use :pwd
.
Upvotes: 37
Views: 46148
Reputation: 20667
Eclipse also has the ability to link the explorer view with the current file, so that whenever you change a file, it is expanded and selected in the explorer view.
Just look for the following image at the top of the view:
Upvotes: 3
Reputation: 329
The other solution ("File-->Properties" or "Alt+Enter") didn't work for me.
I use:
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.
Upvotes: 6
Reputation: 91
Linking to Project Explorer won't work if you have many files - it will select the right file in the list, but it won't "scroll" to that portion so it is visible.
You'd have to manual scroll the Project Explorer view to see where the file is. It could also be nested so deeply that the full location will be obscured by truncation.
Another way to quickly (keyboard-free) see the path is to hover over the file type icon (on top of the open editor window).
Upvotes: 2
Reputation: 129257
What you're looking for is the 'Properties' dialogue for the current file. This can be activated in two ways:
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.
Upvotes: 3
Reputation: 801
Use the Eclipse menu:
File->Properties
or the shortcut:
Alt-Enter
You should be able to see the Location associated with the Resource
Upvotes: 53