sandip chitale's blog    Sandip Chitale's blog (scblog)
NOTE: I have moved many of my modules to NetBeans Plugin Portal . Please check there for latest versions of modules described on this blog.
20060122 Sunday January 22, 2006

Code Template Tools on my NetBeans 5.0 Update Center.

I have uploaded the Code Template Tools module on my NetBeans 5.0 Update Center described here. The Code Template Tools module enables you to interactively work with code templates in most NetBeans text editors. Here is a quick summary of the features:

  • Create a code template based on the selection in the editor. In the example below I had selected the SPL comment in my text editor and invoked the Create Template action:


    Create Template Dialog


  • Use a code template parameter - ${selection}. This parameter is replaced by the current selection in your text editor at the time of insertion of a code template which uses the ${selection}. This allows you to write so called "Surround-with" code templates that surround some (selected) code. For example surrounding a block of statements with "if (condition) {" prefix and "}" suffix. Someday I will blog about how to add your own code template parameters. IMHO, the ability to add you own code templates parameters is under appreciated but very powerful functionality.
  • Insert a code template after selecting it from a dialog. This is essential because of the above feature. You can modify or delete the templates in this dialog.


    Templates Dialog


  • Simulate registers 0-9 and A-Z. The registers are simulated using specially named code templates.
For full details read the online help (Help:Help Content menu) after installing the module or click here.

Sources
The sources are here.

DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.

Posted by sandipchitale ( Jan 22 2006, 09:03:17 AM PST ) Permalink Comments [2]


Trackback URL: http://blogs.sun.com/scblog/entry/code_template_tools_on_the
Comments:

Perhaps the create/show or just create could be added to the right click popup menu? I think that would make it a bit faster to use if you're not using the shortcuts. Nice work btw, verrry useful!

Posted by Greg Tangey on January 23, 2006 at 06:21 PM PST #

Sounds like a great idea. May be soon :)

Posted by sandip on January 23, 2006 at 06:52 PM PST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed








« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

Get NetBeans 5.5

Locations of visitors to this page

Today's Page Hits: 385


XML
All
/Creator
/General
/Hobby
/Java
/JavaScript
/Mozilla
/NetBeans
/Ubuntu
/VisualWeb
/VisualWebPack
/Web 2.0

XML
All
/Creator
/General
/Hobby
/Java
/JavaScript
/Mozilla
/NetBeans
/Ubuntu
/VisualWeb
/VisualWebPack
/Web 2.0

scblog
scblog