In plug-in.xml how to associate a file extension with a particular kind of editor in eclipse plug-in

随声附和 提交于 2019-12-10 21:46:41

问题


I'm developing an eclipse plug-in in which when files with extension ".cert" are to be associated with a certain kind of editor whose implementation is in RateBuilderEditor.java ? I think, I have to mention this in plugin.xml ? How do I achieve this ? How to write this ExtensionPoint ?


回答1:


Here you go:

<extension point="org.eclipse.ui.editors">
  <editor
    class="[editor-impl-class]"
    default="true"
    filenames="*.cert"
    id="[some-id-or-use-impl-class]"
    name="My Custom Editor"
    icon="images/something.png"/>
</extension>


来源:https://stackoverflow.com/questions/5317563/in-plug-in-xml-how-to-associate-a-file-extension-with-a-particular-kind-of-edito

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