Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314953 - Add --launcher.defaultAction to eclipse.ini
Summary: Add --launcher.defaultAction to eclipse.ini
Status: CLOSED FIXED
Alias: None
Product: EPP
Classification: Technology
Component: Packager (show other bugs)
Version: 1.3.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 1.3.0 RC3   Edit
Assignee: Markus Knauer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 16:25 EDT by Andrew Niefer CLA
Modified: 2011-05-20 11:44 EDT (History)
2 users (show)

See Also:


Attachments
Include launcher.defaultAction (21.45 KB, patch)
2010-05-29 04:58 EDT, Markus Knauer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-05-28 16:25:07 EDT
See bug 302192, to take advantage of the new open file functionality introduced in 3.6M6 (bug 4922) the packages should add

--launcher.defaultAction
openFile

to their eclipse.ini files.

This argument tells the launcher that it should try to open a file when it receives a command line without any "-" arguments:
eclipse myFile.txt


Without this argument windows "Open With" integration to associate a file with eclipse doesn't work well.

This affects all packages, not just the java package.
Comment 1 Steffen Pingel CLA 2010-05-28 16:45:47 EDT
+1 

Markus, let me know if you want a patch for the Java package or if you are going to make that change for all packages.
Comment 2 Andrew Niefer CLA 2010-05-28 17:14:09 EDT
Also, the launcher and SWT need to agree on a name so that they can talk to each other.  The launcher derives this from the name of the executable (remove the extension and capitalize the first letter) or the -name argument.  SWT takes this from Display.setAppName, which is called by the workbench and the value is taken from the product exension point.

I took a look at the org.eclipse.epp.package.java.product and it has:
         <property
               name="appName"
               value="Eclipse">
         </property>
which will agree with the default eclipse launcher.  So I don't think you need to worry about the name.  However, it might be a good idea to double check the other packages' product extension point to make sure they are the same.
Comment 3 Markus Knauer CLA 2010-05-29 04:22:40 EDT
(In reply to comment #1)
> Markus, let me know if you want a patch for the Java package or if you are going
> to make that change for all packages.

I'll do that for all packages. It is easier for me to keep them in sync and this is an important change for *all* packages.

(In reply to comment #2)
> I took a look at the org.eclipse.epp.package.java.product and it has:
> <property
> name="appName"
> value="Eclipse">
> </property>
> which will agree with the default eclipse launcher.  So I don't think you need
> to worry about the name.  However, it might be a good idea to double check the
> other packages' product extension point to make sure they are the same.

I will double check... my idea was that all packages should have the same appName, but who knows... maybe there was a change in one of the packages in the meantime.
Comment 4 Markus Knauer CLA 2010-05-29 04:58:54 EDT
Created attachment 170452 [details]
Include launcher.defaultAction

This patch includes 

--launcher.defaultAction openFile

in all package product definitions (epp.product)
Comment 5 Markus Knauer CLA 2010-05-29 05:01:00 EDT
Patch applied to HEAD.
Comment 6 Steffen Pingel CLA 2010-06-10 20:06:57 EDT
On Gtk/64-bit opening of files with the RC4 Java package seems to work.
Comment 7 Markus Knauer CLA 2011-05-20 11:44:29 EDT
Closing as FIXED (available since initial Helios release last year).