Programmatically add code templates?

后端 未结 2 901
傲寒
傲寒 2021-01-14 20:39

I\'m writing a custom XML editor for our project and want to add support for templates. I.e when the user writes \"\" and presses ctrl + space they

相关标签:
2条回答
  • 2021-01-14 20:45

    After alot of searching I fount this ppt that answered almost all questions I had:

    http://www.eclipsecon.org/2008/sub/attachments/Extending_the_XML_and_SSE_editors_from_the_WTP_Project_.ppt

    The templates I was after can programatically be added with the use of the extension point org.eclipse.ui.editors.templates

    0 讨论(0)
  • 2021-01-14 20:47

    Go to the preferences then XML -> XML Files -> Editor -> Templates. Define your new template there.

    0 讨论(0)
提交回复
热议问题