Community
Participate
Working Groups
Currently, IEditorRegistry and IFileEditorMapping interfaces do not expose all the functionality that is required for adding new file types to eclipse programmatically. The implementation classes are needed in most situations where file type mapping changes has to be made. For instance, EditorRegistry.setFileEditorMapping() method is not exposed by the IEditorRegistry interface. Also, this method takes FileEditorMapping[] array which is not exposed. Eclipse should expose the EditorRegistry.setFileEditorMapping() method as an API and also make FileEditorMapping class external.
Another important method in EditorRegistry is the saveAssociations() which should be exposed to serialize the changes made to the FileEditorMappings
Doug, I'm poking around in here now but doing this was not part of my plans...
I was wondering if this would be fixed as part of 3.2? I would like to avoid using internal APIs completely and there doesnt seem to be another way of modifying file types.
What's the status of this? I'd also definitely like to see this become API. Our project for language-specific IDE support (SAFARI) uses a single editor to service several languages, with various services contributed via extensions to SAFARI extension points. I only see two ways of implementing this: (1) pretend that our editor is the default editor by using the ID org.eclipse.ui.DefaultTextEditor (this is obviously bad), or (2) have it register itself as the default editor for each file-name extension that it finds in the contributed SAFARI plugin extensions (much more desirable, this is what we do now). The latter solution requires everything that was mentioned in the original post. Also, many/all of FileEditorMapping's methods (e.g. setDefaultEditor()) talk in terms of EditorDescriptor rather than IEditorDescriptor, but none of their implementations seem to need an EditorDescriptor in particular. So, I think all the various method signatures should be changed to use IEditorDescriptor.
This will not be addressed for 3.2 but there is talk of revisiting the editor API in the next release.
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Remy is now responsible for watching the [EditorMgmt] component area.
my project also need such functionality that dynamically change the default editor according to the perspective. is there any update ? I don't think this two APIs is exposed in indigo release.