Structure

A quick view at the structure of the code.

There are several ways to get a quick overview of a piece of code. For example, we can collapse the code, using ⌘⇧- (macOS) / Ctrl+Shift+Minus (Windows/Linux), so we only see the names of methods and not their implementation. This can help us find the specific code we are looking for more quickly. We can then expand that particular section, using ⌘+ (macOS) / Ctrl+Plus (Windows/Linux).

Note that we can still search the code, using ⌘F (macOS) / Ctrl+F (Windows/Linux), when it is collapsed, and if needed the relevant section will expand.

Alternatively, we can look at the File Structure for a file using ⌘F12 (macOS) / Ctrl+F12 (Windows/Linux) . We can navigate to the section of the code we’re interested in from here.

We can get the same information by opening the Structure tool window, using ⌘7 (macOS) / Alt+7 (Windows/Linux).