views:

144

answers:

2

I've been using Eclipse for about a week now and I'm loving it.. great software for the 'price'. :P However, I'm having a few issues getting started.

The most annoying, so far, has been opening files from outside of Eclipse, and having them set to open w/ Eclipse. When I open a file from the file-explorer or an external application (WinSCP for instance), Eclipse seemingly attempts to open an entirely new instance itself rather than opening the file within a currently running instance. Of course, because this is the case, Eclipse errors out w/ 'The workspace is currently in use. Please select another' (or whatever it says).

Is there a configuration option, or an argument that I can use when opening a file externally that will simply use the currently open instance of Eclipse?

Thx in advance! :)

+2  A: 

The easiest way to open external file in the current Eclipse is to drag-n-drop it to the tabbed area where your files are displayed. You should consider that Eclipse is seriously geared towards using files as part of a project and opening random file with Eclipse is certainly possible but not encouraged. To your question - since Eclipse runs in Java if you attempt to use eclipse.exe to open a file then script will always try to open a new instance, I don't know if what you want is actually doable

DroidIn.net
Thank you for your answer. :)(Btw, I've upvoted your comment for the useful info, but I'm not marking as answered as it was a bit open-ended, and I'd like to see if somebody else has an actual solution.)
Lorren Biffin
Alas, looks like this functionality is not supported yet. See http://is.gd/6eHs9
DroidIn.net
Thanks! Much appreciate. :)
Lorren Biffin
+1  A: 

To add to DroidIn.net's answer, here are a few eclipse bugs related to the question:

  • bug 4922 (from 2001!): "Need ability to open a file in eclipse from the command line", with sockent-monitoring kind of solutions, like the IBM proposition of opening an RCP from an URL, which leads to plugins like EclipseCalls.

    EclipseCall is a plugin that accepts file-open requests on a defined socket port. A specialized client can be used to open a file in Eclipse by command from outside Eclipse, e.g. by double clicking a source file in Windows Explorer.

  • bug 178927 (2007): "way to pass arguments from launcher to a running application instance", based on a modifier launcher (more Windows-oriented, although bug 201154 is mac-oriented). An OSGi-based solution is also investigated.

(On Linux, see also steb)

VonC
Thanks for the useful info! :)
Lorren Biffin