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) Windowsalt+number Windowsctrl+F4

All of these windows are accessible by holding down Windowsalt and pressing the associating number. e.g. If you want to open or close the 1: Project window, you press Windowsalt + 1. You can also minimize the current active tool window using Windowsshift + escape.

Switching tabs Windowsalt+left/right

Some of these windows have multiple tabs in them, i.e. the 6: TODO window. So let’s open that window, using Windowsalt + 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 Windowsalt + and alt + .

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 ctrl + alt + h on the scent() method.

Use Windowsctrl + 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 Windowsctrl + enter, press F4.

Now we can change the implementation.

Why resizing is for dummies Windowsctrl+shift+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 Windowsctrl + shift + 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 Windowsalt + 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 Windowsctrl + shift + F12 and get our focus back on where it belongs, without any distractions.

Happy editing!


Next Chapter

Back to outline