开发者

How to make contributions to JSDT Template Proposals

I've created an eclipse plugin which extends JSDT. When editing a JavaScript file, pressing Ctrl-Space shows "Default Proposals", consisting of general JavaScript Suggestions. Pressing Ctrl-Space again shows "Template Proposals", but the l开发者_Go百科ist is empty. How do I add content to the "Template Proposals" list?


You can use the org.eclipse.ui.editors.templates extension point for this. Something like this:

<extension
    point="org.eclipse.ui.editors.templates">
 <template
       autoinsert="true"
       contextTypeId="javaScript"
       description="Do something"
       id="com.foo.mytemplate"
       name="A silly template">
    <pattern>
fafdsds fafdsda fdadsa
    </pattern>
 </template>
</extension>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜