16

After reading this question regarding Linux:

Open Terminal From Eclipse

I have the same question for Macs. Is there a plugin available that lets me open a finder window or a terminal based on some folder in Eclipse?

Community
  • 1
  • 1
Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148

6 Answers6

20

You can setup an external tool in Eclipse. (It's the green RUN button that has a red toolbox).

Location: /usr/bin/open

Arguments: ${container_loc}

enter image description here

NPike
  • 13,136
  • 12
  • 63
  • 80
  • Nice. Works pretty well for me. I only wish there would be a way to associate a keyboard shortcut with the launch. – Andrew Eisenberg Jun 18 '12 at 23:09
  • 4
    I was getting the error, "Variable references empty selection" until I put quotes around Arguments value like so: "${container_loc}" – 1.21 gigawatts Jun 30 '12 at 19:01
  • Also, you may not have a "Program" option in the Run configurations. In that case go to the menu item Run > External Tools > External Tools Configuration and it should be listed in the window that opens up. Once created you can run and configured it with the Run External toolbar button. – 1.21 gigawatts Jun 30 '12 at 19:05
  • 1
    @Andrew Eisenberg. You can create a keyboard shortcut for the last run tool. Preferences -> Keys -> Run Last Launched External Tool. – James Zaghini Aug 07 '12 at 06:15
  • Use ${resource_loc} to open the current resource – Renaud Sep 26 '12 at 09:01
  • I'm a newbie to working with the Run Config .. it helped to know once I run that script, it A) now appeared in the Run-Configs drop-down & B) I don't even need the drop down if I want to just run the last Run-Config that was executed by just clicking the Run-Config button. Then, for whatever is highlighted in Package Explorer, clicking that run-config opened a Finder to the selected location. Nice solution - thanks! – Gene Bo Apr 21 '14 at 19:55
  • add -a Terminal before ${container_loc} opens up terminal in the folder for me. Now I have two external commands configured, one to open in finder, the other for terminal. – barryku May 12 '17 at 20:44
12

StartExplorer opens the file explorer or the terminal in Mac/Windows/Linux.
Go to Help > Eclipse Marketplace... and search for StartExplorer.

Updated jan-2015.

Jano
  • 62,815
  • 21
  • 164
  • 192
  • Thanks! Just tried it out and it works like a charm. Unfortunately, there is only an old style update site available. So, I had to add this to the dropins folder, but it does seem to work. – Andrew Eisenberg Mar 16 '11 at 05:05
  • It's also available in 3.6 (Helios) from Help > Eclipse Marketplace. Look for "ExploreFS". In 3.7M5 (Indigo) the marketplace was broken last time I checked. – Jano Mar 16 '11 at 22:22
  • Nothing comes up when I search for "ExploreFS" in the Eclipse Marketplace on Juno SR2. – Daryl Spitzer Dec 08 '14 at 16:32
5

Easy shell that has most votes to the question you reference works on OS X, too.

enter image description here

You can install it via Eclipse marketplace. If you don't have Eclipse Marketplace Client (e.g., you are using Eclipse Classic), you can install it: ["Install New Software..."] --> search for "Marketplace Client"

Renaud
  • 16,073
  • 6
  • 81
  • 79
2

For a terminal to launch from Eclipse

  • in Eclipse, if you go to Help->Eclipse Marketplace and search for 'terminal', you will see this plugin from Google. It launches a terminal inside in eclipse and to the location of the selected resource - does the trick. I do think you need a later version of Eclipse for it though.

Eclipse Marketplace Search for a Mac-friendly Terminal

Gene Bo
  • 11,284
  • 8
  • 90
  • 137
2

There is an Incubator project called Local Terminal. You can install it from the Eclipse update site under General Purpose Tools->Local Terminal Much better then http://elt.googlecode.com

laplasz
  • 3,359
  • 1
  • 29
  • 40
2

That could be (not tested) the Open External Plug-in 0.7.0 (different from the Google openextern project mentioned in this other SO answer you reference in the question)

See how to install it here.

alt text

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Open External looks like a great plug-in, but unfortunately the update site that is linked to from the page is no more. – Andrew Eisenberg Nov 19 '10 at 16:20
  • @Andrew: yes but you can download idrectly the plugin.jar at http://code.google.com/p/plug-ins/: http://plug-ins.googlecode.com/files/kr.pragmatic.openexternal.jar (and you can drop it in a shared dropins directory: http://stackoverflow.com/questions/3408961/upgrading-from-eclipse-galileo-to-helios/3409052#3409052) – VonC Nov 19 '10 at 16:23
  • And I also tried the Google Extern Project that you mentioned. The plugin installs, but I get this problem when I try to go to the preference page: java.lang.UnsupportedClassVersionError: Bad version number in .class file Looks like it is compiled for Java 6 only. – Andrew Eisenberg Nov 19 '10 at 17:36
  • Ugh...I hate using the dropins directory. It has caused me no end of trouble in the past. Maybe things are better now. I'll try it. – Andrew Eisenberg Nov 19 '10 at 17:37
  • @Andrew: you mean you don't launch your Eclipse with the latest JDK1.6 possible? (which doesn't prevent you to program in an JDK of your choosing) – VonC Nov 19 '10 at 18:46
  • I know. It's a little more complicated. I write eclipse plugins and the target environment must be JDK 1.5. The best way to ensure that I don't accidentally break anything is to run under 1.5 myself (there are other things I could try such as setting my target platform to be 1.5, while using 1.6), but so far this has been the safest. – Andrew Eisenberg Nov 21 '10 at 22:02
  • @Andrew: Easy: I never "install" the jdk I use for launching Eclipse: I only unzip it in a directory called "`jdk4eclipse`". I reference it in my `eclipse.ini` (see http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659) and that is the only place where that path is used. The rest (like a JDK5) is installed the usual way and referenced by variables like `JAVA_HOME` – VonC Nov 21 '10 at 22:06
  • @Vonc I tried installing the jar from plug-ins.googlecode.com/files/kr.pragmatic.openexternal.jar in my dropins directory, but it didn't work for me with Eclipse 3.5.2. – ThomasW May 19 '11 at 04:08
  • @Thomas: I don't have the right configuration for me to test it directly. Can you reproduce that with more a more recent Eclipse? – VonC May 19 '11 at 05:34