[RCP] Reuse running instance of eclipse [message #242835] |
Thu, 20 May 2004 12:30  |
Eclipse User |
|
|
|
Originally posted by: lorenz.m.gmx.at
Hi,
I have built an RCP app that reads the commandline args given and
accordingly opens editors with files received that way. After
registering the file extension to windows, the user now can simply
double-click on a file to open it.
My problem is that every time a file is opened that way, a new instance
of my program is started. What should happen is that the file should be
opened in an editor in an already running instance.
Has anybody done something like this? How can it be done?
My first idea was to open a socket when the program runs and open all
filepaths that are transmitted to that socket. So a second instance
would have to check if the socket is already open and react accordingly.
The problem with this approach is that when starting the second
instance, almost the complete program has to be loaded - which needs
some time - and the splash screen is shown.
Is there any other way? Maybe even support in eclipse.exe (earliest
possible point)?
thanks
Lorenz
|
|
|
Re: [RCP] Reuse running instance of eclipse [message #286090 is a reply to message #242835] |
Thu, 02 June 2005 00:18  |
Eclipse User |
|
|
|
Originally posted by: galen.white.telstra.com
Hi,
This very similar to what I would want to do. Ideally I would like to
ditch my large set of tools for Eclipse, e.g. for opening text/XML
files by double clicking on them in Explorer, and so on.
This is obviously not practical if a new instance of Exclipse starts
every time you double click a file.
Lorenz, have you resolved this yet? Or has anyone else out there got a
simple solution. It seems like such basic functionality to check for
running instance and load in this context, but I have searched the web
and the newsgroup at length, with no joy.
It's a shame as it is a large impediment to moving to Eclipse from my
existing toolset.
Thanks,
Galen
On Thu, 20 May 2004 18:30:37 +0200, Lorenz Maierhofer
<lorenz.m@gmx.at> wrote:
>Hi,
>
>I have built an RCP app that reads the commandline args given and
>accordingly opens editors with files received that way. After
>registering the file extension to windows, the user now can simply
>double-click on a file to open it.
>
>My problem is that every time a file is opened that way, a new instance
>of my program is started. What should happen is that the file should be
>opened in an editor in an already running instance.
>
>Has anybody done something like this? How can it be done?
>
>
>My first idea was to open a socket when the program runs and open all
>filepaths that are transmitted to that socket. So a second instance
>would have to check if the socket is already open and react accordingly.
>The problem with this approach is that when starting the second
>instance, almost the complete program has to be loaded - which needs
>some time - and the splash screen is shown.
>
>Is there any other way? Maybe even support in eclipse.exe (earliest
>possible point)?
>
>thanks
>Lorenz
|
|
|
Powered by
FUDForum. Page generated in 0.03466 seconds