In CodeWarrior there was a very useful feature in the CodeWarrior Projects view: with a context menu I can open that folder/file in Windows Explorer:
However, this feature is missing in Eclipse, so how to add this functionality?
That ‘Show in Windows Explorer’ is really handy, as I can quickly jump to that file or folder where it is on the disk.
Emulating ‘Show In Windows Explorer’
I was looking for a way how to do this, and some solutions include installing an extra Eclipse plugin. But there is an easy way without installing anything with using an external run configuration.
Open the External Tools Configuration or use the menu Run > External Tools > External Tools Configuration:
Then, do the following:
- Select the ‘Program’ group
- Press the ‘new’ button to create a new configuration
In the new configuration:
- Give the configuration a name
- Specify the command line for the Explorer (on Linux, use your file explorer):
${env_var:SystemRoot}\explorer.exe - As arguments, specify it shall use the selected resource:
/select,${resource_loc} - Press Apply to store the configuration
- Then I can Run it
If you have selected a resource, you will get an error:
So make sure you select a folder/file before running the command.
If you have run the command at least once, it is now easily accessible in the drop down menu:
Exporting Configuration
However, this is not a ‘global’ setting, and only applies to the workspace. So if you have multiple workspaces, you need to create an external tools configuration for each workspace. Or use the ‘Shared File’ option which stores the settings in a file:
Now I can copy that file .launch file to a project in my other workspace easily to have it imported.
Summary
There is no plugin needed for showing a file or folder in the host operating explorer view: an external tools configuration is good enough :-).
Happy Exploring 🙂
This is built into Eclipse with Luna (4.4) onwards. Select the resource, bring up the context menu, in the “Show in…” sub menu there is now a “System explorer” option.
Older versions you can install a plugin such as StartExplorer to add it to the main context menu in a similar way to CodeWarrior – http://basti1302.github.io/startexplorer/
LikeLike
Yes, thanks for the note on Luna. And I saw the startexplorer plugin, but to do the same without a plugin was a plus for my case.
LikeLike
Just to confirm, Is the rest of “show in…” “..Remote Systems View”? That is the closest thing that I see.
Selecting “Show in Remote Systems View” is pretty cool, and from the resulting folder tree view I was able to right click on my source code folder and open a shell from there by right clicking and selecting “Launch Shell”. From this shell, as was mentioned by another commenter, I could call make.
It’s nice to know about all options. Thanks all!
LikeLike
I am using another plugin – Easy Shell. Beside opening in explorer, you can make some other useful things, like opening command prompt or running.
Another benefit is that it runs on Linux too.
LikeLike
Thanks for that hint. Definitely something I should have a look 🙂
LikeLike
Thanks for the tip. This will come in handy.
I’ve done this at work and home, and Build before launch, in the build tab, was checked by default. Other users may want to remember to uncheck this. I’ve also unchecked the Allocate console in the Common tab.
LikeLike
Right, good tips, thank you!
LikeLike
For OS X and Eclipse versions < 4.4 (Luna), create an external program launch configuration as shown in this blog article. Name it "Show in Finder". Set "Location:" to "/usr/bin/open" (without the double quotes). Set "Arguments:" to '-a Finder.app "${container_loc}"' (with the double quotes but without the single quotes). You need to use "container_loc" and not "resource_loc", otherwise Finder will open the file using the default app (e.g., TextWrangler for "txt" files, if that's your default).
In Luna, binding Control-Option-Command-F (OS X) to the "Show In (System Explorer)" command in the Keys preference pane makes accessing this feature very easy.
LikeLike
Hi Paul,
thanks! That’s very useful as I have no experience on Mac, so others who are using Mac have now all the information needed :-).
Erich
LikeLike
Pingback: Show Eclipse Project Location in System Explorer | MCU on Eclipse