Bug 300553 - "--launcher.openFile" can pick up "old" versions of Eclipse
Summary: "--launcher.openFile" can pick up "old" versions of Eclipse
Status: RESOLVED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 4922 301030
  Show dependency tree
 
Reported: 2010-01-22 15:17 EST by Oleg Besedin CLA
Modified: 2016-10-26 11:25 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2010-01-22 15:17:38 EST
The remote file open funcitonality (--launcher.openFile) picks up any running Eclipse instance that fits the specified name ("Eclipse" by default).

If an "old" Eclipse application is running (say, Eclipse 3.5 SDK), the launcher will pick it up as the target of the "--launcher.openFile" command even as it can't process this request.

We probably should try to iterate through open Eclipse processes until we find one that can accept the "--launcher.openFile" command.
Comment 1 Kevin Barnes CLA 2010-01-22 15:46:16 EST
I don't think this is true. The win32 launcher code looks for a window with the title "SWT_Window_XXX" where XXX is what ever string was set in Display.setAppName(). If you are running Eclipse 3.5, the launcher will (likely) never find a window with that title.

On gtk we use atoms instead of window names but the principle is the same and on mac the user will have to associate files with eclipse in the info.plist file and that wasn't done in Eclipse 3.5.

There have been a couple builds where the SWT and launcher support was included, but the workbench support wasn't. That was unavoidable, and not a serious problem since it's unlikely anyone will be running those builds after M5 ships.
Comment 2 Oleg Besedin CLA 2010-01-22 15:57:09 EST
(In reply to comment #1)
> I don't think this is true. 

You are right, at least on Windows, Eclipse 3.5 and Eclipse 3.6M2 are not picked up. I was confused by having several recent I-builds of Eclipse 3.6 which were picked up by the launcher.
Comment 3 Usman Khalid CLA 2016-10-26 11:25:28 EDT
Referring to: eclipse_version.exe --launcher.openFile
whereas _version can be replaced with your installed versions if you have more than one. The command worked but why it asks to create workspace. It should directly open the file. It is not that one is going to work in a project.
Any comments about it?
Thanks.