[ANN] CamelPlugin 0.2

http://www.intellij.org/twiki/bin/view/Main/CamelPlugin

0.2 (#701, #813) - 28 Apr 2003

- Simpler deployment. Now you only need to copy the jar file to the plugins directory.
- The ability to switch easily between regular and plugin mappings (Options -> Camel Plugin, Alt-O,C). Before trying if it works for you, make sure that the regular relevant actions are not unmapped.


"Options -> Camel Plugin" checkbox (Alt-O,C).

It works only for those actions (relevant regular actions, plugin actions) that are mapped to the same keystrokes.
For example, in the case when EditorPreviousWord and CamelPlugin.PreviousWord are both mapped to Ctrl-Left.
By default, all plugin actions are mapped to the same keystrokes of their regular counterparts.
If you map actions to different keystrokes, this checkbox (obviously) won't have any effect.

The checkbox is On. The plugin actions are active.
The checkbox is Off. The regular actions are active.

If you unmapped the regular actions, now you can restore them
by removing the following lines in your keymap xml ($IDEA_CONFIG_PATH/keymaps/):
]]>
Tested with #701, #811 and #813.


Timur

11 comments

Thanks, great Plugin. Hopefully it will be integrated in the next version of IDEA !

0

Great plugin. I've been thinking of writting this myself for a while -
thanks for helping all of us! Now, I just have to figure out a few more key
combinations! I've used every CTRl-ALT-SHIFT thingy I can think of!

--
Jordan Zimmerman
Altura International
Catalog City


0

OK, now I've got Timur's great plugin and I'm getting used to it helping me,
I'm really missing it elsewhere in the ide, particularly in the refactoring
dialogs e.g. Rename.

Doesn't seem like it would be an easy task for a plugin to put in CamelCase
support into all the various text fields in IDEA, so I have added a comment
to the rfe to request that we properly open this rfe and get native camel
case support throughout. The jobs already half done ;)

Cheers,
N.

Timur Zambalayev wrote:

http://www.intellij.org/twiki/bin/view/Main/CamelPlugin



0

I also thought about this. BTW, even regular Ctrl-Left, Right don't work in text fields as in the editor ( http://www.intellij.net/tracker/idea/viewSCR?publicId=11878 ). I just filed a general request: http://www.intellij.net/tracker/idea/viewSCR?publicId=11879


Timur

0

I have a request for the next version. Can you make it so that the Plugin
respects space as a delimiter?

I use _ as a prefix to private fields. Say I have this declaration:

private Ar|rayList _list;

If I do ctrl+right twice I end up here:
private ArrayList _|list;

rather than here:
private ArrayList| _list;

Cheers!
N.

Timur Zambalayev wrote:

http://www.intellij.org/twiki/bin/view/Main/CamelPlugin

>

0.2 (#701, #813) - 28 Apr 2003

>

- Simpler deployment. Now you only need to copy the jar file to the
plugins directory.
- The ability to switch easily between regular and plugin mappings
(Options -> Camel Plugin, Alt-O,C). Before trying if it works for
you, make sure that the regular relevant actions are not unmapped.

>
>

"Options -> Camel Plugin" checkbox (Alt-O,C).

>

It works only for those actions (relevant regular actions, plugin
actions) that are mapped to the same keystrokes.
For example, in the case when EditorPreviousWord and
CamelPlugin.PreviousWord are both mapped to Ctrl-Left.
By default, all plugin actions are mapped to the same keystrokes of
their regular counterparts.
If you map actions to different keystrokes, this checkbox (obviously)
won't have any effect.

>

The checkbox is On. The plugin actions are active.
The checkbox is Off. The regular actions are active.

>

If you unmapped the regular actions, now you can restore them
by removing the following lines in your keymap xml
($IDEA_CONFIG_PATH/keymaps/): > > > > > > > > ]]>
Tested with #701, #811 and #813.

>
>

Timur



0

Could the double click be changed too?

Double click -> select word in identifier
Triple click -> select complete identifier
Quadruple click -> select line

Jacques

0

(To clarify) can you tell me where you think the cursor should be for this option for the following scenarios:

ArrayList _|list -- Ctrl-Left --> ArrayList |_list -- Ctrl-Left --> clas|s Array -- Ctrl-Right --> class| Array -- Ctrl-Right --> class |Array -- Ctrl-Left --> ]]>

I have a request for the next version. Can you make
it so that the Plugin
respects space as a delimiter?

I use _ as a prefix to private fields. Say I have
this declaration:

private Ar|rayList _list;

If I do ctrl+right twice I end up here:
private ArrayList _|list;

rather than here:
private ArrayList| _list;

Cheers!
N.

0

IMHO:
Timur Zambalayev wrote:

(To clarify) can you tell me where you think the cursor should be for
this option for the following scenarios:

>

ArrayList| _list -- Ctrl-Right --> ArrayList _|list > ArrayList _|list -- Ctrl-Left --> ArrayList| _list > ArrayList |_list -- Ctrl-Left --> ArrayList| _list > clas|s Array -- Ctrl-Right --> class| Array > class| Array -- Ctrl-Right --> class |Array > class |Array -- Ctrl-Left --> class| Array > ]]>

>
I'm basing it on my common usage, which is for selecting and overtyping.
Including space in a selection is inconvenient for this.

What does everyone else think?

N.

>> I have a request for the next version. Can you make
>> it so that the Plugin
>> respects space as a delimiter?
>>
>> I use _ as a prefix to private fields. Say I have
>> this declaration:
>>
>> private Ar|rayList _list;
>>
>> If I do ctrl+right twice I end up here:
>> private ArrayList _|list;
>>
>> rather than here:
>> private ArrayList| _list;
>>
>> Cheers!
>> N.


0

I don't think that it's currently possible. Filed: http://www.intellij.net/tracker/idea/viewSCR?publicId=11973

BTW, you can map some other mouse combination (e.g. Alt-Click) to CamelPlugin.SelectWord.

Could the double click be changed too?

Double click -> select word in identifier
Triple click -> select complete identifier
Quadruple click -> select line

Jacques

0

Added to the to do list ( http://www.intellij.org/twiki/bin/view/Main/CamelPlugin ).

I usually correct the selection (when I need it) by moving one space back (for me in most cases it's one space). It happens when going forward and selecting more than one word (with one it's SelectWord of course).

BTW, there's a relevant request: http://www.intellij.net/tracker/idea/viewSCR?publicId=10251

0

Anyway I added it to the to do list. Once it's possible or I find a way to implement it, I'll do it.

Could the double click be changed too?

Double click -> select word in identifier
Triple click -> select complete identifier
Quadruple click -> select line

Jacques

0

Please sign in to leave a comment.