Code Template Tools - plugin detail

Interactively work with Code Templates. Support for Registers.

NetBeans Plugin - Code Template Tools
Plugin owner: sandipchitale
Added: 2007-04-13
License: CDDL
Category: Editing
Downloaded: 3,704 times
 4.25, by 4 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.15 MB   Last Update: 2008-05-17

What's new in this version

Verifications for NetBeans versions

Plugin is not subject to any verification


The Code Template Tools module features include:
  • Show all the Code Templates (for a mime type), Preview and Insert selected Code Template.
  • Create new from scratch. The Create/Modify dialogs have a combobox to insert supported template parameters easily.
  • Create new from selection in the editor by invoking Create Template....
  • Modify
  • Delete
  • Import (no Export) templates. Use the templates saved in the <userdir>/config/Editors/<mimetype>/CodeTemplates/org-netbeans-modules-editor-settings-CustomCodeTemplates.xml file as export format. Send this file to your freinds so that they can import your templates.
  • The ${selection} is replaced by the selection in the editor. This enables definition of templates that surround selected text in your editor. There is an action Edit:Surround With (Ctrl+J T) which shows all the templates in a pop up dialog. If the editor has selection the templates that use the ${selection} template parameter are shown first.
  • The ${clipboard-content} will be replaced with the contents of the clipboard.
  • The ${input-param1 ...} which has attributes that let you prompt the user from enumerated values or suggested values.
  • Use Edit:Expand Template (Ctrl+J SPACE) action to expands the template that matches the word that precedes the caret.
  • Support for Registers 0 through 9 and A through Z. Cut to, Copy to and Paste from register is supported.
  • Ctrl+J R X - Cut to Register action.
  • Ctrl+J R C - Copy to Register action.
  • Ctrl+J R V - Paste from Register action

The registers are implemented as Code Templates named "_REG_" + register name. The register name prefix can be overridden using a System property org.netbeans.modules.codetemplatetools.REGISTER_PREFIX.

Download NetBeans 6.1 compatible version

Download post NetBeans 6.1 compatible version

Download NetBeans 5.x compatible version

web tracker

[ You have to be logged in to be able to comment. ]

User Comments



Hi, are there plans to migrate the plugin for NB 6.7 ?
Posted by iberck on May 17, 2009


how do I can use the plugin? :S , I've installed it but I don't know how to start with.
Posted by raulooo on Feb 12, 2009

NetBeans 6.5

I will try to fix the issues with NetBeans 6.5.
Posted by sandipchitale on Jan 26, 2009

Netbeans 6.5

Are there plans to migrate to Netbeans 6.5 ?

I test it in netbeans 6.5 and works well but some errors are displayed in status bar.

A bug ... the "Edit:Surround With (Ctrl+J T)" does't display in html pages for html code completions.

Posted by iberck on Jan 26, 2009

Excelent plugin

thank you for this excelent plugin !!
I'm waiting for the next release...
Posted by iberck on Jan 26, 2009


awesome, thanks. occasionally need to open the eyes to see ;-)
is there a complete list of "dynamic" content like ${user}, etc ? I would like to create eg. a template that adds a comment line with the actual date.

great tool ! hope it gonna work with 6.5 also.
Posted by devdude on Nov 19, 2008


It has always been open source :)
Posted by sandipchitale on Nov 18, 2008


I would love to see the sourcecode. You still plan to opensource it ?
Posted by devdude on Nov 18, 2008


Thank you for your reply. I just installed 1.31 version and this one works properly :)
Posted by piter on May 14, 2008

NetBeans 6.1 compatible version now available

Piter see: "What is New in this Version?" section.
Posted by sandipchitale on May 08, 2008

Problems with NB 6.1


I have problem with creating new templates on fresh NetBeans 6.1. New template doesn't appear at list after "Save" action..
Posted by piter on May 05, 2008