Java Decl Gen module
I have uploaded the Java Decl Gen module on the Plugin Portal.
This module supports several forms of parameter, variable, array parameter and array variable declarations.
These actions were formerly part of the contrib/CamelCase module. The
CameCase movement and selections are now part of NetBeans 6.0 Java
editor.
Assuming you have typed:
Foo|
in the Java editor you can invoke the following actions:
| Action | Key binding |
Declare Parameter e.g. Foo foo | | Alt+U SPACE |
Declare Parameter with comma e.g. Foo foo, | | Alt+U , |
Declare Variable e.g. Foo foo;| | Alt+U ; |
Declare Variable with initializer e.g. Foo foo = new Foo()|; | Alt+U = |
Declare Variable with casted initializer e.g. Foo foo = (Foo)|; | Alt+U ( |
Declare Array Parameter e.g. Foo[] foos| | Ctrl+Alt+U SPACE |
Declare Array Parameter with comma e.g. Foo[] foos, | | Ctrl+Alt+U , |
Declare Array Variable e.g. Foo[] foos;| | Ctrl+Alt+U ; |
Declare Array Variable with initializer e.g. Foo[] foos = new Foo[]{};| | Ctrl+Alt+U = |
Declare Array Variable with casted initializer e.g. Foo[] foos = (Foo[]) ;| | Ctrl+Alt+U ( |
The highlighted regions behave like editor code templates. Use
ENTER to escape the code template parameter editing mode - then the
cursor will be positioned at |.
TODO
- Use the same algorithm as the one used by Java Editor to generate proposed parameter or variable names.
Sources
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( Oct 19 2007, 04:41:12 PM PDT ) Permalink

Wednesday October 17, 2007
TIP: Structural selection in Netbeans 6.0 Java editor
In this entry I had talked about the Structural selection in Netbeans Java editor. The keybindings for the same functionality have changed in NetBeans 6.0. The new keybindings are:
Alt+Shift+. - successively selects outer syntactic
element. Statement -> Surrounding Block Statements -> Surrounding
Block Statements -> Surrounding Method -> Surrounding Class and
so on. I use this for quick selection.
Alt+Shift+, - successively selects inner syntactic element. This works only if you had expanded the selection using the Alt+Shift+. . This helps me fine tune the selection if I went too far.
Posted by sandipchitale
( Oct 17 2007, 10:33:48 PM PDT ) Permalink
NB 60 compatible LineTools on NetBeans Plugin Portal
I have updated the NetBeans 6.0 compatible LineTools module to NetBeans Plugin Portal. I have removed the Move/Copy Selection/Line Up/Down actions from this module as they are now part of NetBeans 6.0 editors. I have checked in the updated sources in here.
Posted by sandipchitale
( Oct 17 2007, 09:15:33 PM PDT ) Permalink