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.
20071019 Friday October 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.

 


Posted by sandipchitale ( Oct 19 2007, 04:41:12 PM PDT ) Permalink Comments [2]


20071017 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 Comments [4]


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 Comments [0]










« October 2007 »
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today

Get NetBeans 5.5

Locations of visitors to this page

Today's Page Hits: 418


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