
Wednesday December 26, 2007
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.
Posted by sandipchitale
( Dec 26 2007, 04:54:22 AM PST ) Permalink
Trackback URL: http://blogs.sun.com/scblog/entry/reorder_module_on_netbeans_plugin