Search code examples
eclipseeclipse-plugineclipse-cdteclipse-jdteclipse-templates

How to build a Template like javadoc in jdt and cdt


I am trying to incorporate feature similar to JavaDoc in my Java and C/C++ editor. Suppose I type "ABC" and press enter, it should be auto completed as

 
   /*
    * ABCD
    * XYZ
    * 1234
    */

I have to do it programmatically. What are the ways that I can achieve this?


Solution

  • This link should help Add Java code template programmatically

    You can set the context of the template as 'JavaDoc'

    If not programmatically then you can go to preferences->Java->Editor->Templates. And create a new template.

    cheers, Saurav