[ANN] CamouflagePlugin Plugin v0.10 - NEW : automatic mode

Camouflage Plugin, v0.10
available though the plugin manager



Added : Automatic mode
-


Each time you open a class editor, a - chosen - set of intentions is
automatically executed.
Note: none of the methods related camouflaging intention are automated yet.
I will depend on the reply I'll receive to :
http://www.intellij.net/forums/thread.jsp?forum=23&thread=50938


Added : 'Collapse All' enhancemenent
-


When you call 'Collapse All', all the class methods are 'flattenized',
to make the result as compact as possible.
This is optional.


Changed: config UI
-


(in IDE settings)
- design change
- contains the Release Notes, Tips, Warnings, and limitations ..


Limitations : see the 'Release Notes' in the config UI


Alain

25 comments

This is using CamouflagePlugin 0.9. (By the way, the plugin manager
does not believe 0.10b is newer than 0.9. It does not show up
highlighted in red and will not allow me to upgrade.)

Error message: Error during dispatching of
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.codeInsight.h.a.bj$2@13f4ebd,notifier=null,catchExceptions=false,when=1067879766484]
on sun.awt.windows.WToolkit@14a77a7
java.lang.NullPointerException
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.regionAround(FlattenizeMethodIntention.java:51)
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.isNotFlattenized(FlattenizeMethodIntention.java:26)
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.isAvailableFor(FlattenizeMethodIntention.java:21)
at
ravet.intellij.plugins.camouflagePlugin.intentions.AbstractIntention.isAvailable(AbstractIntention.java:30)
at com.intellij.codeInsight.h.a.bd.c(bd.java:12)
at com.intellij.codeInsight.h.a.bd.b(bd.java:101)
at com.intellij.codeInsight.h.a.bj$2.run(bj$2.java:1)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.s.a(s.java:43)
at com.intellij.ide.s.dispatchEvent(s.java:6)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

0

Flattening the for loop in this example leads to slightly strange results:

package test;

import java.util.List;

public class TestFolding
{
void foo() {
List list = null;
for (int i = 0, size = list.size(); i < size; i++) {

}
}
}

I get "for (int i in 0, size = list.size()..size-1)...".

0

Jonas Kvarnström wrote:

> Flattening the for loop in this example leads to slightly
> strange results:
> ..
> I get "for (int i in 0, size = list.size()..size-1)...".


Thanks for the report.
FYI, I use regexp to recognize "camouflageable" statements, and extract
the part(s) that will be reused. Obviously, I didn't test this case. I
hope I won't have to abandon regexp to solve this problem.

I'll drop the "size= .." declaration, and the solution will look like :

for (int i in 0..list.size()-1)

Alain

0

Alain Ravet wrote:

FYI, I use regexp to recognize "camouflageable" statements, and extract
the part(s) that will be reused. Obviously, I didn't test this case. I
hope I won't have to abandon regexp to solve this problem.


Well, in the worst case I guess you could just skip camouflaging such
statements with multiple variable declarations inside the for parentheses.

0

Jonas Kvarnström wrote:

Well, in the worst case I guess you could just skip camouflaging such
statements with multiple variable declarations inside the for
parentheses.



In the meantime, you can kill individual camouflages : place the caret
in the offending area, and call the "kill camouflage" intention.

Alain

0

Another instance of the same exception, this one with instructions on
how to reproduce it:

Error message: Error during dispatching of
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.codeInsight.h.a.bj$2@4daf7,notifier=null,catchExceptions=false,when=1067950830109]
on sun.awt.windows.WToolkit@14a77a7
java.lang.NullPointerException
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.regionAround(FlattenizeMethodIntention.java:51)
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.isNotFlattenized(FlattenizeMethodIntention.java:26)
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.isAvailableFor(FlattenizeMethodIntention.java:21)
at
ravet.intellij.plugins.camouflagePlugin.intentions.AbstractIntention.isAvailable(AbstractIntention.java:30)
at com.intellij.codeInsight.h.a.bd.c(bd.java:12)
at com.intellij.codeInsight.h.a.bd.b(bd.java:101)
at com.intellij.codeInsight.h.a.bj$2.run(bj$2.java:1)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.s.a(s.java:43)
at com.intellij.ide.s.dispatchEvent(s.java:6)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

I was typing the following code:

/*

  • Created on 2003-nov-04 at 14:00:13

*/
package test;

public class TestGenericCouldBeInterface]]>
{
void foo()
}

I had just typed the opening parenthesis after "foo". Placing the caret
within the parentheses causes the exception to pop up again and again.

0

I have watched this plugin for a bit, but never thought I would find it
useful. Today I gave it a shot. Wow! What a quick change of mind. Very
very nice. Thanks very much Alain!!!

0

> very nice.

Thanks Barry.
What part of it do you find the most useful?

Any suggestion on how to improve it? I'm running short of ideas, currently.
Apart from the eliminating the limitations due to the current OpenAPI, I
can only think of camouflaging one more pattern.

before
try {
Thread.sleep(2000);
} catch (InterruptedException e){
e.printStrackTrace();
}


after
sleep 2000 ms

I guess that there are a few other like this. I'm open to suggestions.

Alain

0

Alain Ravet wrote:

I'm running short of ideas, currently.



Not completely true.
Planned: faking "static import"

before :
v = Math.sqrt(4);

after
v = °sqrt(4);

Alain

0


Alain Ravet wrote:

What part of it do you find the most useful?


This will have to wait a few days. My initial concren was that it would
be too cumbersome. But I did not find that the case at all. Using
intentions works out quit nicely.

Any suggestion on how to improve it?


Well, I just ran into something. I was debugging and had methods
paramters camo'd. I wanted to inspect a method paramter. What I did was
double click on the visible part of the camo'd paramters:

public void doAppend(event) {...}

But what ended up selected was the type of 'event', not 'event' itself:

public void doAppend(LoggingEvent event) {
^^^^^^^^^^^^

Don't know if its possible to remember the selection point just prior to
un-camo'ing so that the double click could be redirected to the correct
point afterwards.

I guess that there are a few other like this. I'm open to suggestions.


Maybe rather than hard coding the some mechanism by
which we can specify abitrary patterns and the text to display. (If I
remember, you said you used regex for some of the matching. Thus this
should be very doable I would think.)

-bk

0

Barry Kaplan wrote:

..Using intentions works out quit nicely.



Funny. I thought the automatic mode, that appeared in v0.10, was the
nicest feature :).

Well, I just ran into something. I was debugging and ....

Don't know if its possible to remember the selection point just prior
to un-camo'ing so that the double click could be redirected to the
correct point afterwards.



Does the simple click work? I know opening/unfolding regions is not as
smooth as it could be. One could say that this plugin "abuses" the
folding system, as it was not designed for such a use. There are also a
few know limitations :
http://www.intellij.net/tracker/idea/viewSCR?publicId=19019#602494

Maybe rather than hard coding the some mechanism by
which we can specify abitrary patterns and the text to display.



I've had this in the back of my mind for quite some time, but as I'm
lazy, I've been waiting for the code to ask me a pluggable solution.
Now, if you add your vote to it..

Alain

0


Alain Ravet wrote:

Barry Kaplan wrote:

>> ..Using intentions works out quit nicely.


Funny. I thought the automatic mode, that appeared in v0.10, was the
nicest feature :).


Yes. Auto makes having to use the intentions much less necessary. I'm
still playing with the level of defaults I want. So far I find myself
setting up the auto settings and then unfolding. I also do a
collapase-all often. But rarely am I finding myself doing (vs undoing)
individual camo's.


>> Well, I just ran into something. I was debugging and ....
>> Don't know if its possible to remember the
>> selection point just prior to un-camo'ing so that the double click
>> could be redirected to the correct point afterwards.


Does the simple click work? I know opening/unfolding regions is not as
smooth as it could be.


Single click opens the block cleanly. But I wanted to select the
paramter name so I could inspect it. Since I could "see", I thought I
could do the most direction: double click it.


>> Maybe rather than hard coding the some mechanism by
>> which we can specify abitrary patterns and the text to display.


I've had this in the back of my mind for quite some time, but as I'm
lazy, I've been waiting for the code to ask me a pluggable solution.
Now, if you add your vote to it..


Well, before drive you from you well deserved lazyness, let me play some
more and see if I really feel the need to camo more than is already
available.

-bk

0

Perfect, that is a long standing feature request of mine:
http://www.intellij.net/tracker/idea/viewSCR?publicId=4821
When should I look for it?

Thanks,
Jon

Alain Ravet wrote:

Apart from the eliminating the limitations due to the current OpenAPI, I
can only think of camouflaging one more pattern.

before
try {
Thread.sleep(2000);
} catch (InterruptedException e){
e.printStrackTrace();
}


after
sleep 2000 ms


0

Alain Ravet wrote:

Any suggestion on how to improve it? I'm running short of ideas, currently.


Can the CamouflagePlugin add to the code as well? For example, have you
seen the standard where the closing curly brace of methods and classes
are followed with a // comment immediately after the brace that says
something like "} // end getMethod" or "} // end MyClass"? I'm
wondering if you can show that in the code even though it isn't really
present. Having this feature prevents the sorry copy and paste error
where the trailing comment is for a different method name.

Thanks,
Jon

0

Jon Steelman wrote:

Perfect, that is a long standing feature request of mine:
http://www.intellij.net/tracker/idea/viewSCR?publicId=4821
When should I look for it?



Your request is about adding plain folding to try catch statement. The
current version of the plugin can already add folding to try/catch for,
while, if, ..

Alain

0

Jon Steelman wrote:

Can the CamouflagePlugin add to the code as well? For example, have
you seen the standard where the closing curly brace of methods and
classes are followed with a // comment immediately after the brace
that says something like "} // end getMethod" or "} // end MyClass"?
I'm wondering if you can show that in the code even though it isn't
really present. Having this feature prevents the sorry copy and paste
error where the trailing comment is for a different method name.

>

Added to the todo list.

Please note that the original idea behind the plugin is to make code
simpler to read by __removing__ useless info, not by adding.

Alain

0

Alain Ravet wrote:

Your request is about adding plain folding to try catch statement. The
current version of the plugin can already add folding to try/catch for,
while, if, ..


Hmm, guess I didn't express it well in the write up. I wanted a single
fold to do exactly what you described and elide not only all the catches
and finally, but to camouflage the try block (but not it's content) as well.

Jon

0

Alain Ravet wrote:

Added to the todo list.

Please note that the original idea behind the plugin is to make code
simpler to read by __removing__ useless info, not by adding.


:)

And it does make code simpler to read by allowing those who want the
junked up code to turn on the option but not pollute the code for the
rest of us.

Cheers,
Jon

0

Exception in #977 FYI:
java.lang.IndexOutOfBoundsException: Index: 5, Size: 5

at java.util.ArrayList.RangeCheck(ArrayList.java:507)

at java.util.ArrayList.get(ArrayList.java:324)

at
ravet.intellij.plugins.camouflagePlugin.helpers.ForParametersRangeFactory.g(ForParametersRangeFactory.java:33)

at
ravet.intellij.plugins.camouflagePlugin.helpers.ForParametersRangeFactory.parametersFromLastMatch(ForParametersRangeFactory.java:13)

at
ravet.intellij.plugins.camouflagePlugin.helpers.Placeholders.rangeParams(Placeholders.java:35)

at
ravet.intellij.plugins.camouflagePlugin.helpers.Placeholders.forTheParamsIn(Placeholders.java:15)

at
ravet.intellij.plugins.camouflagePlugin.intentions.CamouflageForLoopIntention.camouflageOrRefoldForParams(CamouflageForLoopIntention.java:56)

at
ravet.intellij.plugins.camouflagePlugin.intentions.CamouflageAllForLoopsIntention$1.visitForStatement(CamouflageAllForLoopsIntention.java:20)

at
ravet.intellij.commons.visitors.ForStatement_Visitor.visitElement(ForStatement_Visitor.java:12)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.ForStatement_Visitor.visitElement(ForStatement_Visitor.java:15)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.ForStatement_Visitor.visitElement(ForStatement_Visitor.java:15)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.ForStatement_Visitor.visitElement(ForStatement_Visitor.java:15)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.ForStatement_Visitor.visitElement(ForStatement_Visitor.java:15)

at
com.intellij.psi.JavaElementVisitor.visitFile(JavaElementVisitor.java:72)

at
ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.camouflageForParams(AutomaticClassMultiFolder.java:149)

at
ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.processTheFile(AutomaticClassMultiFolder.java:53)

at
ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.editorCreated(AutomaticClassMultiFolder.java:34)

at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.intellij.util.EventUtil$2.dispatchToListener(EventUtil.java:3)

at com.intellij.util.EventListenerList.dispatch(EventListenerList.java:35)

at com.intellij.util.EventUtil$1.invoke(EventUtil.java:6)

at $Proxy14.editorCreated(Unknown Source)

at com.intellij.openapi.editor.d.d.a(d.java:10)

at com.intellij.openapi.editor.d.d.createEditor(d.java:42)

at com.intellij.openapi.fileEditor.b.a.d.o(d.java:136)

at com.intellij.openapi.fileEditor.b.a.d.(d.java:65) at com.intellij.openapi.fileEditor.b.a.a.]]>(a.java:65)

at com.intellij.openapi.fileEditor.b.a.b.createEditor(b.java:65)

at com.intellij.openapi.fileEditor.b.f.b(f.java:229)

at com.intellij.openapi.fileEditor.b.f.access$900(f.java:310)

at com.intellij.openapi.fileEditor.b.f$3.run(f$3.java:1)

at com.intellij.openapi.command.b.a.executeCommand(a.java:95)

at com.intellij.openapi.fileEditor.b.f.a(f.java:106)

at com.intellij.openapi.fileEditor.b.f.openFile(f.java:513)

at com.intellij.openapi.fileEditor.b.f$1.run(f$1.java:8)

at com.intellij.openapi.command.b.a.executeCommand(a.java:95)

at com.intellij.openapi.fileEditor.b.f.openTextEditor(f.java:254)

at com.intellij.openapi.fileEditor.b.c.a(c.java:68)

at com.intellij.openapi.fileEditor.b.c.access$500(c.java:123)

at com.intellij.openapi.fileEditor.b.c$2.run(c$2.java:1)

at com.intellij.openapi.command.b.a.executeCommand(a.java:39)

at com.intellij.openapi.fileEditor.b.c.d(c.java:7)

at com.intellij.ide.c.f.actionPerformed(f.java:3)

at com.intellij.openapi.actionSystem.b.m.a(m.java:15)

at com.intellij.openapi.actionSystem.b.l.processMouseEvent(l.java:8)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at com.intellij.ide.s.a(s.java:25)

at com.intellij.ide.s.dispatchEvent(s.java:107)

at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)


0

Nathan Brown wrote:

Exception in #977 FYI:



Thanks for the report. Do you have a test-case for this bug? It's
related to a for-statement parameters.

Alain

0

Sorry I don't... it just popped up while I was debugging and I forget
which class it was. If I get it again I'll let you know.

Cheers,
N.

Alain Ravet wrote:

Nathan Brown wrote:

>> Exception in #977 FYI:



Thanks for the report. Do you have a test-case for this bug? It's
related to a for-statement parameters.

Alain


0

I don't know if this has already been discussed but for read-only files all intentions are disabled and there
currently is no way to run the camouflage intentions without making the file writable.

One solution could be to provide the intention-actions in an additional sub-menu at the end of the View-menu. Because we probably won't get the feature of read-only-intentions for this...

Good work.
Regards
Frank Bruch

0

FYI
I'm getting this every time I open a specific file:

Error message: Attempt to add a fold region that is the same as existing
or intersects one. Old FoldRegion (1510:1516). Trying to add FoldRegion
(1510:1516)
java.lang.Throwable

at com.intellij.openapi.diagnostic.Logger.error(Logger.java:16)

at com.intellij.openapi.editor.a.n$c_.a(n$c_.java:64)

at com.intellij.openapi.editor.a.n.addFoldRegion(n.java:9)

at
ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder$1.run(CodeFolder.java:39)

at com.intellij.openapi.editor.a.n.runBatchFoldingOperation(n.java:13)

at
ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder.foldRegion(CodeFolder.java:32)

at
ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder.foldOrRefoldRegionN(CodeFolder.java:25)

at
ravet.intellij.plugins.camouflagePlugin.intentions.CamouflageFinalKeywordIntention.camouflageOrRefoldKeywordFinal(CamouflageFinalKeywordIntention.java:40)

at
ravet.intellij.plugins.camouflagePlugin.intentions.CamouflageAllFinalKeywordsIntention$1.visitKeyword(CamouflageAllFinalKeywordsIntention.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:13)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)

at
ravet.intellij.commons.visitors.KeywordsVisitor.visitElement(KeywordsVisitor.java:16)

at
com.intellij.psi.JavaElementVisitor.visitFile(JavaElementVisitor.java:170)

at
ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.camouflageFinals(AutomaticClassMultiFolder.java:130)

at
ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.processTheFile(AutomaticClassMultiFolder.java:52)

at
ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.editorCreated(AutomaticClassMultiFolder.java:34)

at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.intellij.util.EventDispatcher.a(EventDispatcher.java:31)

at com.intellij.util.EventDispatcher.a(EventDispatcher.java:16)

at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:44)

at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:10)

at $Proxy15.editorCreated(Unknown Source)

at com.intellij.openapi.editor.a.d.a(d.java:28)

at com.intellij.openapi.editor.a.d.createEditor(d.java:15)

at com.intellij.openapi.fileEditor.a.a.d.f(d.java:30)

at com.intellij.openapi.fileEditor.a.a.d.(d.java:34) at com.intellij.openapi.fileEditor.a.a.a.]]>(a.java:6)

at com.intellij.openapi.fileEditor.a.a.b.createEditor(b.java:1)

at com.intellij.openapi.fileEditor.a.f.b(f.java:493)

at com.intellij.openapi.fileEditor.a.f.access$900(f.java:365)

at com.intellij.openapi.fileEditor.a.f$3.run(f$3.java:2)

at com.intellij.openapi.command.b.a.executeCommand(a.java:58)

at com.intellij.openapi.fileEditor.a.f.a(f.java:635)

at com.intellij.openapi.fileEditor.a.f.openFile(f.java:582)

at
org.tzambalayev.ideaplugins.tabswitch.TabSelector.selected(TabSelector.java:43)

at
org.tzambalayev.ideaplugins.tabswitch.OpenFilesDialog.select(OpenFilesDialog.java:72)

at
org.tzambalayev.ideaplugins.tabswitch.TabSwitchKeyEventDispatcher.dispatchKeyEvent(TabSwitchKeyEventDispatcher.java:64)

at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:824)

at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741)

at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592)

at java.awt.Component.dispatchEventImpl(Component.java:3506)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at com.intellij.ide.r.b(r.java:5)

at com.intellij.ide.r.a(r.java:101)

at com.intellij.ide.r.dispatchEvent(r.java:22)

at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)



Alain Ravet wrote:

Camouflage Plugin, v0.10
available though the plugin manager



Added : Automatic mode
-----------------------
Each time you open a class editor, a - chosen - set of intentions is
automatically executed.
Note: none of the methods related camouflaging intention are automated yet.
I will depend on the reply I'll receive to :
http://www.intellij.net/forums/thread.jsp?forum=23&thread=50938


Added : 'Collapse All' enhancemenent
------------------------------------
When you call 'Collapse All', all the class methods are 'flattenized',
to make the result as compact as possible.
This is optional.


Changed: config UI
------------------
(in IDE settings)
- design change
- contains the Release Notes, Tips, Warnings, and limitations ..


Limitations : see the 'Release Notes' in the config UI


Alain

0

Error message: Attempt to add a fold region that is the same as existing or intersects one. Old FoldRegion (3477:3520). Trying to add FoldRegion (3506:3591)
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:16)
at com.intellij.openapi.editor.a.n$c_.a(n$c_.java:64)
at com.intellij.openapi.editor.a.n.addFoldRegion(n.java:9)
at ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder$1.run(CodeFolder.java:39)
at com.intellij.openapi.editor.a.n.runBatchFoldingOperation(n.java:13)
at ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder.foldRegion(CodeFolder.java:32)
at ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder.foldOrRefoldRegionN(CodeFolder.java:25)
at ravet.intellij.plugins.camouflagePlugin.helpers.CodeFolder.plainSystemCollapse(CodeFolder.java:131)
at ravet.intellij.plugins.camouflagePlugin.intentions.AbstractCamouflageIntention.foldBlockStatement(AbstractCamouflageIntention.java:193)
at ravet.intellij.plugins.camouflagePlugin.intentionsFolding.FoldOneIfStatementIntention.foldIfStatement(FoldOneIfStatementIntention.java:31)
at ravet.intellij.plugins.camouflagePlugin.intentionsFolding.FoldAllIfStatementsIntention$1.visitIfStatement(FoldAllIfStatementsIntention.java:20)
at ravet.intellij.commons.visitors.IfStatement_Visitor.visitElement(IfStatement_Visitor.java:13)
at ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)
at ravet.intellij.commons.visitors.IfStatement_Visitor.visitElement(IfStatement_Visitor.java:18)
at ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)
at ravet.intellij.commons.visitors.IfStatement_Visitor.visitElement(IfStatement_Visitor.java:18)
at ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)
at ravet.intellij.commons.visitors.IfStatement_Visitor.visitElement(IfStatement_Visitor.java:18)
at ravet.intellij.commons.visitors.AbstractVisitor.doVisitChildren(AbstractVisitor.java:22)
at ravet.intellij.commons.visitors.IfStatement_Visitor.visitElement(IfStatement_Visitor.java:18)
at com.intellij.psi.JavaElementVisitor.visitFile(JavaElementVisitor.java:170)
at ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.foldIfs(AutomaticClassMultiFolder.java:89)
at ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.processTheFile(AutomaticClassMultiFolder.java:60)
at ravet.intellij.plugins.camouflagePlugin.actions.AutomaticClassMultiFolder.editorCreated(AutomaticClassMultiFolder.java:34)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.util.EventDispatcher.a(EventDispatcher.java:31)
at com.intellij.util.EventDispatcher.a(EventDispatcher.java:16)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:44)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:10)
at $Proxy15.editorCreated(Unknown Source)
at com.intellij.openapi.editor.a.d.a(d.java:28)
at com.intellij.openapi.editor.a.d.createEditor(d.java:15)
at com.intellij.openapi.fileEditor.a.a.d.f(d.java:30)
at com.intellij.openapi.fileEditor.a.a.d.(d.java:34) at com.intellij.openapi.fileEditor.a.a.a.]]>(a.java:6)
at com.intellij.openapi.fileEditor.a.a.b.createEditor(b.java:1)
at com.intellij.openapi.fileEditor.a.f.b(f.java:493)
at com.intellij.openapi.fileEditor.a.f.access$900(f.java:365)
at com.intellij.openapi.fileEditor.a.f$3.run(f$3.java:2)
at com.intellij.openapi.command.b.a.executeCommand(a.java:26)
at com.intellij.openapi.fileEditor.a.f.a(f.java:635)
at com.intellij.openapi.fileEditor.a.f.access$1400(f.java:400)
at com.intellij.openapi.fileEditor.a.f$7.run(f$7.java:9)
at com.intellij.openapi.command.b.a.executeCommand(a.java:58)
at com.intellij.openapi.fileEditor.a.f$6.run(f$6.java:2)
at com.intellij.ide.i.a.a.a(a.java:20)
at com.intellij.ide.i.a.a.c(a.java:2)
at com.intellij.openapi.project.a.b$5.run(b$5.java)
at com.intellij.util.LaterInvokator$FlushQueue.run(LaterInvokator.java:7)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at com.intellij.ide.r.b(r.java:5)
at com.intellij.ide.r.a(r.java:109)
at com.intellij.ide.r.dispatchEvent(r.java:22)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

0

Please sign in to leave a comment.