Camel Case Movement and Selection module
I have uploaded the Camel Case Movement and Selection module to my NetBeans 5.0 update center described (here). The term camel case refers to the Java identifier naming convension.
This module enables quick movement of caret to the camel case boundaries. For example if you have the following Java code then you can use the supported actions to move the caret to the locations marked by |:
Character.|is|Upper|Case|(char);
The caret movement and selection is supported.
This module provides the following actions:
| Action | Key binding |
| Previous Camel Case Position | Ctrl+Alt+Left |
| Next Camel Case Position | Ctrl+Alt+Right |
| Select to Previous Camel Case Position | Ctrl+Alt+Shift+Left |
| Select to Next Camel Case Position | Ctrl+Alt+Shift+Right |
I have tested it for Java sources.
Sources
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( Mar 27 2006, 01:59:27 PM PST ) Permalink
Trackback URL: http://blogs.sun.com/scblog/entry/camel_case_movement_and_selection
Fixed some bugs:
Posted by Sandip on March 29, 2006 at 05:34 PM PST #
Hi Sandip,
Thanks for this great module. I'm using it more and more, and I will soon not be able to live without!! ;)
Two little things though.
Could it be possible to treat consecutive spaces as only one? It happends very often that I use shift-ctrl-alt-right instead of the regular shift-ctrl-right and continue beyond the current identifier.
And could it be possible to make it work also in comments?
Thanks again for this great module!!
Hugues
Posted by Hugues Ferland on April 04, 2006 at 06:49 AM PDT #
Thanks. See my next blog for more enhancements.
I see the issue with spaces. Looks like the Syntax Support (which is what I am using to identify the "Identifier" token in the source buffer) treats each space as a token. I can add code skip over consecutive spaces. Alternatively I could delegate to the Next/Previous word actions of the editor kit.
Posted by Sandip on April 04, 2006 at 09:02 AM PDT #
Posted by Sandip on April 04, 2006 at 09:38 AM PDT #
Posted by Gustavo Santucho on April 09, 2006 at 06:55 AM PDT #
Posted by Sandip on April 09, 2006 at 07:50 PM PDT #