开发者

How to make contributions to JSDT Template Proposals

开发者 https://www.devze.com 2023-02-17 22:35 出处:网络
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 a

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

精彩评论

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