Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 527626

Summary: [GenericEditor] Allow to define a custom icon for certain content types
Product: [Eclipse Project] Platform Reporter: Simon Scholz <simon.scholz>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, mistria
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Simon Scholz CLA 2017-11-22 10:12:37 EST
By using the editorContentTypeBinding with the org.eclipse.ui.editors extension point a certain content type is associated with the generic editor.

What if I want to specify an icon for a particular content type, like it is done when using the editor entry, which has an icon attribute?

I'd suggest to add an icon attribute to the editorContentTypeBinding element, so that the icon of the generic editor can be overridden in case a certain content type is shown in the generic editor.

Current workaround is to use the editor element:

   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor"
            default="false"
            icon="/icons/myeditorsicon.png"
            id="com.vogella.ide.ui.editor"
            name="My Editor">
      </editor>
   </extension>

If could be nicer to have this:


   <extension
         point="org.eclipse.ui.editors">
      <editorContentTypeBinding
            contentTypeId="com.vogella.ide.ui.editorContentTypeBindingID"
            icon="/icons/myeditorsicon.png"
            editorId="org.eclipse.ui.genericeditor.GenericEditor">
      </editorContentTypeBinding>
   </extension>
Comment 1 Dani Megert CLA 2017-11-22 10:18:17 EST

*** This bug has been marked as a duplicate of bug 513034 ***