SECTION 9 Space Savers

Tip 76: Fold Away Custom Blocks of Code

You may have noticed code folds in Java EE classes, in Javadoc comments, or in the GUI Builder’s Swing forms. Code folds are collapsible blocks that are marked by a vertical line and a plus or minus sign (see Figure 89). Default folds are inserted by the IDE, so you can hide generated blocks of code, or code blocks that you never modify. Click the minus sign or press Ctrl-Minus (Mac: Command-Minus) to collapse a block. Click the plus sign or press Ctrl-Plus (Mac: Command-Plus) to expand it.

FIGURE 89: Code fold

image

In addition to the default code folds, you can also define custom ...

Get 100 NetBeans™ IDE Tips & Tricks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.