eclipse rcp change icon for xml configuration file

白昼怎懂夜的黑 提交于 2019-12-06 15:42:23

I could to solve my problem, here is my solution if someone should have the same issue.

 <extension
        point="org.eclipse.core.contenttype.contentTypes">
     <content-type
           base-type="org.eclipse.core.runtime.xml"
           file-names="configuration.xml"
           id="org.eclipse.core.runtime.xml.spl"
           name="Software Product Line Configuration"
           priority="normal">
     </content-type>
  </extension>
  <extension
        point="org.eclipse.ui.editors">
     <editor
           class="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"
           default="true"
           icon="icons/configuration.png"
           id="YOUR_ID"
           name="Software Product Line Configuration">
        <contentTypeBinding
              contentTypeId="org.eclipse.core.runtime.xml.spl">
        </contentTypeBinding>
     </editor>
  </extension>

I imported the org.eclipse.wst.xml.ui bundle to my workspace and had a look into Extension tab in the MANIFEST.MF file. The extension point org.eclipse.ui.editors appeared just one. So I used the implementation in the class attribute and it worked :)

Edit: If I would have known about the Eclipse Plugin Spy, this would have been easier. So, if a feature is already present, just use the magic shortcut to figure out the implementation details :)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!