In eclipse, reveal current file in filesystem
Asked Answered
P

11

46

In eclipse, is there a way, to reveal the currently selected file in the filesystem. I currently need it to open in explorer, but it could also be in finder or nautilus.

Basically, I do not need the "Open with System Editor" option. I would like a right-click menu with the option: "Show file in explorer/finder/nautilus".

Thanks

Pallua answered 21/7, 2009 at 19:28 Comment(1)
This is the following Eclipse bug: bugs.eclipse.org/bugs/show_bug.cgi?id=107436Arvo
D
51

Note: You can also develop your own external tool to open the file in a Windows explorer

alt text

Or you can use an eclipse plugin like StartExplorer.

alt text


Notes on MacOS:

zvikico mentions:

On Mac OS X, replace the location with /usr/bin/open and the arguments should be just ${container_loc}.

But Adam cautions:

Doesn't work - OSX, you need to put quotes around the ${container_loc} otherwise you'll often get bizarre error messages because it can't cope with spaces in file names.

But user2036022 details:

you can use -R "${resource_loc}" on macosx as argument to /usr/bin/open to be consistent with other similar tools.

Dorthea answered 21/7, 2009 at 19:35 Comment(4)
Great tip. On Mac OS X, replace the location with /usr/bin/open and the arguments should be just ${container_loc}.Biedermeier
love your 'external tool' solution .. very tidy and no plugin! tip: and /e, before /select to open with folders panelPhagocyte
omg ! 3 years spending time right click, properties, get path, and finder, while I could do it in one clic ! :'(Cinematography
@Biedermeier Doesn't work - OSX, you need to put quotes around the ${container_loc} otherwise you'll often get bizarre error messages because it can't cope with spaces in file names.Cottage
B
15

ExploreFS is a cross platform plugin and works fine on Ubuntu and Mac OSX.

  1. open "Install New Software" (from help menu in OSX),
  2. add http://www.junginger.biz/eclipse/,
  3. select ExploreFS from the checklist,
  4. choose appropriate options and install the extension.

Now you can click on your project, package or file and select Explore in File System and it will open the location in your default file manager.

screenshot

Brenneman answered 9/2, 2013 at 12:44 Comment(1)
Cool!! it makes the life so easy. My prayers with the develop :DZeuxis
H
10

I've been recently using Eclipse Luna version, and it has that feature natively implemented, very nice!

In "Project Explorer" view, right click on the file you're interested in --> "Show In" --> "System Explorer"

enter image description here

Helsa answered 23/10, 2014 at 13:48 Comment(3)
I was happy to read this in the Luna "What's New" but I can't get it to show up in actual use. Is it file extension specific? I have no "Show In" menu's except in Team>.Hyperbole
@Hyperbole It's not file extension specific, it should appear once you right click on the file you are interested in, it's right below the "New" option. Also you can display it if you press Alt+Shift+W. Remember to select the file you want to view before using the keyboard shortcutHelsa
Thanks for the clarification. I see the Show In but only on CVS managed projects. Any projects that are Git don't show it. If I look in the Git Perspective - Working Directory, I see the 'Show In' but it's unavailable (gray).Hyperbole
V
5

Open the Properties of the file (Right Click->Properties) and the dialog will give you the full filesystem path.

Vaccine answered 21/7, 2009 at 19:31 Comment(1)
He didn't want to SEE the path, he wanted to OPEN the folder. Seeing the path is almost useless because you then have to waste ages navigating by hand until you reach it.Cottage
U
4

Have a look at the PluginBox: http://pluginbox.sourceforge.net/plugins.html. This works with Linux as well. You can configure it precisely or choose a schema for Gnome, KDE, ...

Unbelt answered 23/3, 2011 at 16:4 Comment(1)
Worked without configuration on my eclipse on OSX.Titanism
B
4

Try the EasyShell extension: http://marketplace.eclipse.org/content/easyshell

Babu answered 5/10, 2011 at 16:34 Comment(0)
D
2

Why don't you right click on your file and select "show in> system explorer" then you will find life is beautiful.

BTW, my eclipse version :Luna Service Release 1 (4.4.1)[for mac]

Duke answered 16/3, 2015 at 3:3 Comment(1)
Oddly, the Show In menu is not an option in my Luna install (4.4.x). And in my install of Mars (4.5.0) the Show In menu only has the option "Terminal". (It opens an Eclipse Terminal view with the working directory set to the file's.)Undergarment
F
1

Adding Show in Nautilus using External Tools is pretty easy too, very similar to the process for Windows in VonC's answer. Simply create the following shell script, chmod +x it and add it to the PATH. Then use it in Eclipse's External Tools Configuration window, as shown in the screenshot below.

~/bin$ cat run-nautilus.sh 
#!/bin/bash
nautilus `dirname $1`

Set up the external tools configuration as shown here

Faxan answered 4/10, 2011 at 13:23 Comment(0)
L
1
  • @VonC has given the solution, but this solutions helps to understand more and put shortcut to the feature:

enter image description here

enter image description here

  • Explorer command line arguments

    • /select [object] - selects the file or folder in the new explorer window
  • Directly we can not put shortcut to this feature, but setting shortcut to Last launched external Tool, we can put as follows:
    enter image description here

Licha answered 21/12, 2017 at 4:24 Comment(0)
E
0

I cannot seem to comment, so I will post as an answer instead On OSX the answer @zvikico is very close, I would change it to:

Location: /usr/bin/open
Arguments: -R ${container_loc}

The -R argument is a reveal in finder argument, as opposed to actually trying to open the file.

Then you just Run As Shell as mentioned in the other external tool answers

Erepsin answered 14/12, 2012 at 23:39 Comment(0)
C
0

How to use the EasyShell plugin in Eclipse to quickly jump to, find, or copy the path of a file or folder

Use the EasyShell plugin. I love it--it's really great for this!

Install it, then right-click on the project in the Project Explorer and go to Easy Shell --> "Open with Default Application", "Copy full path to clipboard", or "Copy qualified name to clipboard":

enter image description here

Choosing "Copy Full Path..." might copy this path:

/home/gabriel/Downloads/Install_Files/Arduino/arduino-1.8.12/libraries/Mouse/src/Mouse.cpp

while "Copy Qualified Name" might copy this, which starts with the Eclipse project name as the root of the path:

/arduino-1.8.12/libraries/Mouse/src/Mouse.cpp

Choosing "Open with default Application" will open the file or folder in your default file manager, such as Windows Explorer in Windows, or Nautilus or Nemo in Linux.

Going further

  1. Ubuntu's default file manager is Nautilus, but I really hate that file manager, so I upgraded mine to Nemo on all of my Linux machines, as I explain here: How to install Nemo and set it as the default file manager in Ubuntu 18.04, 20.04, etc.. Jump to the end of my answer in the section titled "Why use nemo over Ubuntu's default nautilus file manager?" to see screenshots and why I love nemo so much more. I actually ended up moving from Windows to Linux finally on all my machines, even for my kids, in part because of the beauty and utility and time-saving and ease-of-use offered by the nemo file manager. Furthermore, MacOS's horrific and cumbersome file manager is one of the reason's I can't switch to Mac.
  2. I have documented other Eclipse plugins I really like in my document here, under the section "Plugins to Install": Eclipse setup instructions on a new Linux (or other OS) computer: Plugins to Install
Calaverite answered 29/11, 2022 at 16:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.