Friday Oct 19, 2007

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:

ActionKey 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.

 

About

sandipchitale

Search

Archives
« April 2014
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