Bug 300555 - Allow plugin developers to register file extensions
Summary: Allow plugin developers to register file extensions
Status: NEW
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: equinox.components-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-22 15:25 EST by Oleg Besedin CLA
Modified: 2019-09-06 15:30 EDT (History)
12 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:25:42 EST
The bug 4922 is about Eclipse <-> OS integration. In the curernt state that bug adds ability for the launcher/SWT/UI chain to open from a command line. 

For instance, for Windows, that looks like:
  <path>\eclipsec.exe -name Eclipse --launcher.openFile <qualified file name>

What's missing is the ability for a plugin author to register file extensions that they can handle.
Comment 1 Kevin Barnes CLA 2010-01-22 15:50:51 EST
Isn't this usually handled by installers rather than the application itself?
Comment 2 Andrew Niefer CLA 2010-01-22 16:06:26 EST
"installers" here could be p2?  This does require native code
Comment 3 Kevin Barnes CLA 2010-01-22 16:19:08 EST
It's different for every platform.
On windows it's a registry key (see 'ftype /?'). 
On mac you use the plist file. 

I think every window manager is different on linux, but I could be wrong. There's some info on creating file associations for Ubuntu here: http://ubuntuforums.org/archive/index.php/t-51012.html. Looks Gnome specific though.
Comment 4 Oleg Besedin CLA 2010-01-22 16:21:32 EST
(In reply to comment #1)
> Isn't this usually handled by installers rather than the application itself?

Installers are applications too :-). I am speaking about adding Eclipse API to
register file types, presumably backed up by platform-specific fragments. The
APIs are to be used both by Eclipse-based "installers" and Eclipse-based
"applications".
Comment 5 Oleg Besedin CLA 2010-01-22 16:25:51 EST
(In reply to comment #3)
> It's different for every platform.

Can we start by supporting 2 - 3 major cases (Windows and Mac?)and be open to community contributing fragments for other OSes?
Comment 6 Thomas Watson CLA 2010-01-22 16:38:19 EST
(In reply to comment #5)
> (In reply to comment #3)
> > It's different for every platform.
> 
> Can we start by supporting 2 - 3 major cases (Windows and Mac?)and be open to
> community contributing fragments for other OSes?

I'm not convinced we can fit this into 3.6, unless you think there is something really simple we can do.  But I think there are lots of things we need to consider.

* What happens if a file extension is already handled by another application on the system, would we override, ask the user what to do etc.

* What happens if multiple Eclipse installations have the same bundle which is trying to register for the file extension.  Which one wins.  Do we keep asking the user questions like the browsers do (hey firefox/IE/etc. is not the default browser, you want it to be?).

I think there are lots of these kinds of issues that we need time to think through.
Comment 7 John Arthorne CLA 2010-01-22 17:18:29 EST
This is closely related to the SWT Program class, which allows you to query what programs are registered for a given file extension.
Comment 8 Eclipse Webmaster CLA 2019-09-06 15:30:10 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.