- Open the IDE settings.
- Under the Editor node, click Code Folding. Code Folding page is displayed.
- In the Collapse by default list, select the check boxes to the left of the code constructs you want to be displayed collapsed.
- Apply changes.
Now, when you first open files for editing, the selected code constructs will be shown as shaded brief information, with the preview available at the mouse pointer.
For example, you can automatically hide imports:

I18N support is enhanced with the special folding that allows you to hide method calls, retrieving properties from resource bundles and replace them with actual property values:

Anonymous classes can be presented in a concise way, as shown below:

- Open the IDE settings and click Console Folding. The Console Folding page is displayed.
-
In the Fold console lines that contain area, configure a list of patterns that determine
the lines to be always folded in console output.
Use
(Alt+InsertCommand N; Command Enter),
(EnterEnter) or
(Alt+DeleteCommand Delete) to create, edit or remove the patterns. -
In the Exceptions area, configure a list of patterns that determine the lines
that never should be folded in console output.
Use
(Alt+InsertCommand N; Command Enter),
(EnterEnter) or
(Alt+DeleteCommand Delete) to create, edit or remove the patterns.
- In the console output, select the relevant line.
- On the context menu, choose Fold lines like this.
-
In the Console Folding dialog box that opens, the selected line is added
to the Fold console lines that contain list.
Click OK to have the line added to the list as is.
To edit the new pattern, select it, click
(EnterEnter),
and update the character string as necessary
in the Folding Pattern dialog box that opens.

