Bug 270186 - [EditorMgmt] Impossible to programmatically define an editor w/ a given label and icon
Summary: [EditorMgmt] Impossible to programmatically define an editor w/ a given label...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 17:29 EDT by Robert M. Fuhrer CLA
Modified: 2019-09-06 16:08 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert M. Fuhrer CLA 2009-03-26 17:29:37 EDT
In the IMP project, we have a single editor class that can be customized to provide editing services for various languages. This is contributed via a single extension. Our users (IDE builders) create extensions of an IMP-defined extension point that define certain characteristics of their languages, including a user-readable name (e.g. "X10") and an associated icon, used to represent source files in that language (e.g. in the Package Explorer).

We've been successful in getting the language-specific icon to be associated with the source files, though at the expense of using internal API. Namely, we've been forced to derive from the internal class FileEditorMapping in order to override the icon provided.

We've been unable to programmatically define the label that shows up in "File Associations" dialog.

There seem to be several causes for this; (1) IEditorDescriptor doesn't expose enough API, (2) the EditorDescriptor ctor is not visible, (3) the class EditorDescriptor is final,
(4) getEditorRegistry().setFileEditorMappings() will only accept an array of FileEditorMappings, and (5) FileEditorMapping requires an EditorDescriptor.

Would it be possible to open up the API a bit here? It wouldn't require much, I don't think.
Comment 1 Boris Bokowski CLA 2009-03-30 14:15:43 EDT
We're open to adding new API, but note that we are already past the API freeze for 3.5.

Would you be able to contribute a patch with the suggested new API?

Another idea would be to pull you into e4 as an early adopter, since everything we do there will be available programmatically, by design.
Comment 2 Boris Bokowski CLA 2009-11-17 13:04:40 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:08:58 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.