简体   繁体   中英

How to open folder of a file not in the project explorer in Eclipse IDE?

I know there are various plugins like StartExplorer or Easy Shell that allow to open the containing folder for files or folders that are selected in the project explorer. What I looking for is to open the containing folder for a file that is NOT in the eclipse project explorer.

A typical situation I find myself is in CDT view, I crtl-click on an include statement and open an .h file that is not in the project explorer, so I can't use the plugins above to open the containing folder. The pathname tip appears for 5 seconds when I put the mouse pointer on top of the name of the file, so I can navigate to that folder manually, but sometimes I get a very very deep pathnames and it takes ages to navigate there, and I have to check the pathname tip many times because it keeps disappearing. Other editors have a open containing folder option when you right click on the name of the file. I miss this functionality in eclipse.

Does anybody know how to solve this?

EDIT: An easy way to reproduce this situation is by dragging and dropping a text file from outside eclipse into eclipse. I'd like to open the containing folder of this file (imagine I didn't know where it came from). As suggested below, I tried Ctrl+Return, but it doesn't work in this situation, it just says there is not property pages for this file.

Look at the file properties ( Alt+Return or via the context menu).

The location field is actually a non-editable text which means you can select the value ( Alt+L Ctrl+A Ctrl+C ) and copy it to the clipboard.

If that doesn't work, then try F2 . Some tooltips then become windows so you can copy&paste the content.

If that also doesn't work, then I fear you'll have to file a feature request.

[EDIT] Seems like you hit Bug 207467 - [PropertiesDialog] Properties page for external files

To open the file in the system explorer, download the following jar file

https://github.com/downloads/samsonw/OpenExplorer/OpenExplorer_1.2.0.v201101172217.jar

Then past in the folder ...\\eclipse\\dropins\\ Now restart Eclipse and you will see a new icon in the toobar.

I have test this with "Eclipse Java Neon".

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM