3 comments
Comment actions Permalink

Nice one.

The configuration UI looks a bit familiar: The tab "Introduce Variable" should
probably renamed, shouldn't it? ;)

And I've got a little feature request: I've been thinking about writing something
similar for log4j statements to fold the check for the log-level:

Before:
if (LOG.isDebugEnabled()) {
LOG.log(Level.DEBUG, "This is a log message" );
}

After:
LOG.log(Level.DEBUG, "This is a log message" );

or even better:
LOG.debug("This is a log message" );

I guess that one would fit perfectly into your plugin. What do you think?


Sascha


Alain Ravet wrote:
>

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

>
>

Added :
------
- camouflage 'throws' expressions.
- camouflage 'for(;;)'
- configuration ui :
Allows to choose what will be done by the 'Camouflage All All' intention.
This action is active when the caret is in the PsiClass area

>

public class Foo extends Bar ..
xxxxxxxxxxxxxxxx



0
Comment actions Permalink


Sascha Weinreuter wrote:
>Nice one.

Thanks. So, it's not a weird idea, after all. I was starting having
doubt about my own sanity, for just producing it.


> The tab "Introduce Variable" should probably renamed, shouldn't it? ;)

Yep :)



>a little feature request .. for log4j statements
> Before:
> if (LOG.isDebugEnabled()) {
> LOG.log(Level.DEBUG, "This is a log message" );
> }
> After:
> LOG.debug("This is a log message" );


It's a perfect candidate. I'll put it high in my todo list.



I'm thinking about letting people create their own intentions, in the
config screen, by choosing a visitor and editing a Velocity template.


If you have any votes left, there a few related request that would allow
this technique to leap forward :

#17503- Openapi-folding : allow icons(image?) as placeholders
http://www.intellij.net/tracker/idea/viewSCR?publicId=17503

#17500- Openapi-folding : allow 1 color per folding region
http://www.intellij.net/tracker/idea/viewSCR?publicId=17500

#17501- Openapi-folding : tab placeholder without modifying the folded text
http://www.intellij.net/tracker/idea/viewSCR?publicId=17501

#17502- Openapi-folding : access to the default placeholder
http://www.intellij.net/tracker/idea/viewSCR?publicId=17502

Alain

0
Comment actions Permalink

Sascha Weinreuter wrote:

>The configuration UI looks a bit familiar: The tab "Introduce Variable" should
>probably renamed, shouldn't it? ;)

>
Fixed. in v0.6

>And I've got a little feature request: I've been thinking about writing something
>similar for log4j statements to fold the check for the log-level:
>
>Before:
>if (LOG.isDebugEnabled()) {

LOG.log(Level.DEBUG, "This is a log message" );

>}
>
>After:
>LOG.log(Level.DEBUG, "This is a log message" );
>

>
Done in v0.6

0

Please sign in to leave a comment.