Console folding customization

Once I wrote about console folding for Groovy stacktraces. Naturally, many people wished similar things could work for other languages and frameworks. Long story short, there’s now a settings page dedicated to the console folding. It provides a settings page where you may specify which console lines to fold:

This functionality is available in IDEA 9.0.2 via Console Folding plugin. In IDEA X, it will be bundled. Furthermore, there will be a nice addition to these settings: an action that allows you to add folding rules very easily right from the console. Just select the fragment which will toggle the folding of the lines containing it, and right-click:

This entry was posted in New Features and tagged , . Bookmark the permalink.

9 Responses to Console folding customization

  1. Jason Dias says:

    Can you add an option to just omit the lines?

  2. Randall R Schulz says:

    Can this be used to suppress the many repetitions in a stack overflow exceptions caused by unbounded or excessive recursion?

  3. Peter Gromov says:

    Jason, just omitting the lines is not possible at the moment, and I suppose that would be misleading. Actually the folded stack traces look almost as if the lines were omitted, there’s just something gray saying ‘n internal calls’ on the right.

    Randall, this can make the repetitions shorter and easier to recognize, that’s it. No suppression yet, and I can’t imagine how that would look like.

  4. Cameron Beccario says:

    I’m running IDEA 9.0.2 without the Console Folding plugin installed. And yet, stack trace lines under sun.reflect.* and java.reflect.* are being folded in the Run console. Is it possible to turn this off? A search in settings for “console folding” pointed only to “Colors & Fonts”.

  5. Peter Gromov says:

    Cameron,

    Unfortunately, no. In IDEA 9 the only way to turn off console folding is to disable the Console Folding plugin.

  6. Cameron Beccario says:

    Hi Peter:
    Thanks for the reply!
    I cannot disable the plugin because I do not have it installed; it is not listed under the Settings->Plugins->Installed tab. And yet, IDEA 9 is still folding sun.reflect.* and java.reflect.*.

  7. Peter Gromov says:

    Cameron,

    I see, sorry for misreading you. There’s really no possibility to turn this off in 9 on user level. But, if you want it very-very-very much, you can go to lib/resources.jar/META-INF/IdeaPlugin.xml and comment out the following line:

    <stackFrameFilter implementation=”com.intellij.execution.filters.ReflectionStackFrameFilter”/>

  8. Arnon says:

    I tried to use the plugin to fold text that is not exceptions/stack traces, but it seemed to have no effect (Idea 9.03).
    I use EasyB and I want to fold all lines that have no failures (containing “, Failures: 0,”)
    I tried to use various patterns in the plugin to no effect…

    Ideas?

  9. Peter Gromov says:

    Arnon, this should work. Character case may not match. Maybe there are several whitespaces where you have one, or vice versa. They may also use a tab character.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>