Community
Participate
Working Groups
It seems to me (correct me if I'm wrong) that there is no way to build an editor having IEditorDescriptor object other than cast it to EditorDescriptor and use createEditor() method. This however is discouraged since EditorDescriptor class is not part of an API (it resides in an "internal" package). What I'm trying to achieve is to create a multipage editor, where one of the pages is a default XML editor. However all I get from IEditorRegistry.getDefaultEditor() is an IEditorDescriptor instance.
Moving Dougs bugs
On a slightly related note, we also need to do this in Team but for a slightly different reason. We need to determine if the default editor for a file is a text editor or not. We need to do this in order to ensure that we can use the editor when showing annotations. That is, we create the editor and test whether it implements ITextEditor. If it does not, we use the default text editor instead of the default editor for the file type.
Allowing clients to create editor parts opens a new class of lifecycle issues, since the workbench is no longer in control of all editor instances. See e.g. bug 204679. If this API is added, its Javadoc must urge clients to make sure all created editors are eventually disposed properly. (In reply to comment #2) IMO, a better solution for the Team team would be a query on IEditorDescriptor that returns the Class object that would be used to create an editor instance.
In scenario I described above workbench doesn't really have to know about created instance as it shouldn't manage it. And it sounds quite normal (still worth mentioning in Javadoc) that what you have created, you should dispose.
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Remy is now responsible for watching the [EditorMgmt] component area.
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.