Reorder module on NetBeans Plugin POrtal


I have uploded the Reorder module to the NetBeans Plugin Portal.

The assymetry in the way ,  (comma)  is used to separate the items in parameter and arguments lists always causes problem when one wants to reorder that list in Java editor.  Is that why Java allows trailing commas in array initializer? ;) may be. This module supports single click swapping of a parameter, argument or array initializer expressions with pervious or next item in the list. Each item of the sequence can be a simple literal, an identifier or a more complex function call expression. The comma delimiter is correctly handled.

For example with caret at | in:

void method(int iii, String |sss, boolean bbb){}
pressing CTRL+ALT+. (i.e. period) or invoking Source:Swap Next action yields:
void method(int iii, boolean bbb, String |sss){}
or pressing CTRL+ALT+, (i.e. comma)
or invoking Source:Swap Previous action with the original source yields:
void method(String |sss, int iii, boolean bbb){}

Sources

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

Comments:

Post a Comment:
Comments are closed for this entry.
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