[ANN] CamouflagePlugin Plugin v0.2


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

This plugin adds 4 intentions to IDEA :

  • camouflage the current type cast.

  • camouflage all the type cast in the current class.

  • camouflage the current final keyword

  • camouflage all the final keyword in the current class.




Todo :

  • camouflage for loops

  • add configurations options.

  • remove dependencies, and publish code




This plugin replaces the now dead TypeCastCollapserPlugin.

8 comments
Comment actions Permalink

- expanding previously collapsed 'for' doesn't work as expected.
- signature of collapsed if is somewhat strange: for (int i in 1..10) no
matter if
my original loop looks like: for (Enumeration e= ...;
e.hasMoreElements(); )
making this feature unusable because I cannot see what's beneath collaped
loop.

Cool idea, Alain! Configuration in IDE Preferences would be great.



Uzytkownik "Alain Ravet" <alain.ravet.list@wanadoo.be> napisal w wiadomosci
news:bksdba$i4d$2@is.intellij.net...
>

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

>

This plugin adds 4 intentions to IDEA :

  • camouflage the current type cast.

  • camouflage all the type cast in the current class.

  • camouflage the current final keyword

  • camouflage all the final keyword in the current class.

>
>
>

Todo :

  • camouflage for loops

  • add configurations options.

  • remove dependencies, and publish code

>
>
>

This plugin replaces the now dead TypeCastCollapserPlugin.

>


0
Comment actions Permalink

Feature request:

Allow to collapse array aggregates like:

int[] i = { 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 4, 5, 6, 6}

Should become:

int[] i = {...};

thanks,
Dimiter

0
Comment actions Permalink

Michal,

> - expanding previously collapsed 'for' doesn't work as expected.

Nothing to expect, Michal, it is not yet implemented (check on the wiki
: it's still in the todo list).

> - signature of collapsed if is somewhat strange:
> for (int i in 1..10) no matter if

It is a fake, a dummy I used to see what it would look like.


> .. use I cannot see what's beneath collaped loop.
Hover the mouse over a it, or expand it, with .

> Configuration in IDE Preferences would be great.
Will come, soon. Stay tuned.


Alain


0
Comment actions Permalink

dimiter wrote:

> Feature request:
>
> int[] i = {...};

That's standard IDEA behaviour :
Menu.View.Folding.Fold Selection

Alain

0
Comment actions Permalink

That's standard IDEA behaviour :
Menu.View.Folding.Fold Selection


Though it would be nice to autofold the array initialiZers without
having to select them first.

Usecase: I have a midlet, where a lot of calculations are optimized to
use tables. These tables make 50% of the code and I have to fold them
every time. It's not hard, just boring..

cheers,
D.

0
Comment actions Permalink

dimiter wrote:
> every time. It's not hard, just boring..

You're lazy. Good point.
Did you try macros?



> Though it would be nice to ..
> Usecase: I have a midlet, ..


It's not clear yet, as it does so little, but the Camouflage plugin is
not about folding code, but about changing the way existing code is
displayed, to make it more human-readable, without changing it.

In the absence of plugin points in the editor display processor, I'm
only (ab)using the folding system to reach my goal.


Anyway, I'll keep an eye on your request, as it's trivial to implement.

Alain

0
Comment actions Permalink

Correction:
> Anyway, I'll keep an eye on your request,
> as it's trivial to implement.

should read :

> as it's trivial to ADD to the plugin.

Alain

0
Comment actions Permalink

Added in v0.7 :

Feature request:
collapse array aggregates like:
int[] i = { 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 4, 5, 6, 6}
Should become:
int[] i = {...};




Active for
- 1 init expression (with the caret inside the expression), or
- all the.. in the class (with the caret on the class name)

Alain

0

Please sign in to leave a comment.