Netbeans Code Templates again

18 11 2008

A while ago I wrote about the challenge to find more info about the code templates in Netbeans (link). It makes life easier (and faster) if you dont type the same stuff over and over again, but rather let it the IDE execute like a macro. Even better if it can make use of some dynamic elements. I didnt really solve or find more info, but I came across a plugin that it like a more user-friendly version of the create/insert/modify screen hidden in Netbeans option panes. Check out at (link). Unfortunatley there is no sourcecode and I am not sure if the author gonna upgrade it to 6.5.

Update Jan 2009: Sourcecode available at ttp://hg.netbeans.org/main/contrib/file/tip/codetemplatetools/ and it works fine with NB6.5





Netbeans Code Templates

5 08 2008

I like to use the swift-footed code templates to automatize certain repeating programming tasks. In other IDE’s or word-processor’s they are usually called macro.

You wonder where Netbeans saves the templates that come with the box ?
They are in a jar file !
@ ..\Program Files\NetBeans x.y\gsf1\modules\org-netbeans-modules-gsfpath-api.jar

And that one’s you add land
@ ..\Documents and Settings\userxyz\.netbeans\x.y\config\Editors\text\x-java\CodeTemplates\org-netbeans-modules-editor-settings-CustomCodeTemplates.xml

I still try to find out what kind of predefined variables I can use, eg. ${cursor}.