Skip to the content.

Chapter 5 - Embedded Windows

Back to outline

IntelliJ has various Tool Windows, like the 1: Project window, 9: Version Control window, or 3: Find window. When one of these embedded windows have focus, other shortcuts are available.

In this section we’ll discuss some of them.

Opening/Closing (Toggling) Mac

All of these windows are accessible by holding down Mac and pressing the associating number. e.g. If you want to open or close the 1: Project window, you press Mac + 1.

Switching tabs Mac + shift + [/]

Some of these windows have multiple tabs in them, i.e. the 6: TODO window. So let’s open that window, using Mac + 6. You’ll notice that it contains the Project, Current File, Scope Based and Default Changelist tabs. You can switch between these tabs by pressing Mac + shift + [ and + Macshift + ].

Give it a try!

Some Tool Windows will display results, like 3: Find and 8: Hierarchy, which you can use to navigate to directly.

There’s two ways of doing this:

Let’s try ‘em both out.

We want to follow the path the code takes at runtime until we get to CoffeeBeans.scent(), so let’s trace back our steps from there by opening CoffeeBeans.java, and Mac + + F7 on the scent() method.

Use Mac + enter on CoffeeSmeller.smell(), see where it takes you, then ctrl + enter on Chapter5.smellBeans().

We figured out we want to change something in CoffeeSmeller, so select CoffeeSmeller in the 8: Hierarchy tool window and instead of pressing Mac + enter, press Mac + .

Now we can change the implementation.

Why resizing is for dummies Macshift + + F12

Stop resizing your Tool Windows, use them when you need them (see Opening/Closing (Toggling)).

If you don’t need your Tool Window, you’ll want to focus back on your editor window. You can do this from anywhere (meaning, from any focussed Tool Window) by pressing Macshift + + F12.

So, let’s first imagine we were looking at a hierarchy of CoffeeBeans.scent(), we looked at CoffeeSmeller’s use and we checked where in the package structure CoffeeSmeller was situated by pressing Mac + F1.

Now we have both the 1: Project and 8: Hierarchy Tool Windows open. But we want to continue tweaking the CoffeeSmellers code, so let’s press Macshift + + F12 and get our focus back on where it belongs, without any distractions.

Happy editing!


Next Chapter

Back to outline