Expand and Collapse Code

Quickly view specific parts of a class by expanding or collapsing code blocks.

Collapse all code using ⌘⇧- (macOS) / Ctrl+Shift+Minus (Windows/Linux) and expand the section you need using ⌘+ (macOS) / Ctrl++ (Windows/Linux). You can collapse an individual section using ⌘- (macOS) / Ctrl+- (Windows/Linux) or expand all code again using ⌘⇧+ (macOS) / Ctrl+Shift+Plus (Windows/Linux).


Related Resources

Convert Class to Record
Convert Class to Record
Use inspections to convert classes to Java 16 records.
Create New Class
Create New Class
Quickly add new classes to your project.
Extend Selection
Extend Selection
Extend and shrink your current code selection.