Folding any scope or selection

I was so excited when folding appeared in IDEA,
but disappointed when I discovered that it works
only for whole methods, javadoc and imports.

Folding helps a great deal in large, complex methods.
Just select some lines and press Ctrl+ to hide them.

For example, I'd like to hide
- some 100 lines between the loop's head and tail
- everything but the lines that control the flow of
execution (loops, if/else, and some computations)
- everything but the lines that deal with some subset
of methods, variables etc. (Ctrl-Shift-F7)

Some say well-designed programs have only small methods,
and one could always extract smaller methods.
But some algorithms are less coherent and understandable
when scattered across many distinct entry points whose
mutual usage is not instantly visible.
Others are hot spots and perform much better without
leaving one method scope, even in the latest hotspot vm.

Best regards,
Nischkaa

0
3 comments
Avatar
Permanently deleted user

Yes we have such request (you can find it in the tracker).
It's of rather high priority and we will implement it soon after Ariadna
release (so you'll be able to use it when the next EAP starts).

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

"Nischkaa Kovacs" <nischkaa@gmx.de> wrote in message
news:5608439.1034160683495.JavaMail.jrun@is.intellij.net...

I was so excited when folding appeared in IDEA,
but disappointed when I discovered that it works
only for whole methods, javadoc and imports.

>

Folding helps a great deal in large, complex methods.
Just select some lines and press Ctrl+ to hide them.

>

For example, I'd like to hide
- some 100 lines between the loop's head and tail
- everything but the lines that control the flow of
execution (loops, if/else, and some computations)
- everything but the lines that deal with some subset
of methods, variables etc. (Ctrl-Shift-F7)

>

Some say well-designed programs have only small methods,
and one could always extract smaller methods.
But some algorithms are less coherent and understandable
when scattered across many distinct entry points whose
mutual usage is not instantly visible.
Others are hot spots and perform much better without
leaving one method scope, even in the latest hotspot vm.

>

Best regards,
Nischkaa



0
Avatar
Permanently deleted user

It's Tracker Request #1723, sorry for posting here.

0
Avatar
Permanently deleted user

That would be a nice feature, but if you've got a loop with a 100 line
iteration, it might be a good idea to refactor and break that to smaller
methods.

"Nischkaa Kovacs" <nischkaa@gmx.de> wrote in message
news:5608439.1034160683495.JavaMail.jrun@is.intellij.net...

I was so excited when folding appeared in IDEA,
but disappointed when I discovered that it works
only for whole methods, javadoc and imports.

>

Folding helps a great deal in large, complex methods.
Just select some lines and press Ctrl+ to hide them.

>

For example, I'd like to hide
- some 100 lines between the loop's head and tail
- everything but the lines that control the flow of
execution (loops, if/else, and some computations)
- everything but the lines that deal with some subset
of methods, variables etc. (Ctrl-Shift-F7)

>

Some say well-designed programs have only small methods,
and one could always extract smaller methods.
But some algorithms are less coherent and understandable
when scattered across many distinct entry points whose
mutual usage is not instantly visible.
Others are hot spots and perform much better without
leaving one method scope, even in the latest hotspot vm.

>

Best regards,
Nischkaa



0

Please sign in to leave a comment.