Over a million developers have joined DZone.
Platinum Partner

Using Favorites in IntelliJ IDEA to Quickly Access Files

The Performance Zone is brought to you in partnership with New Relic. Quickly learn how to use Docker and containers in general to create packaged images for easy management, testing, and deployment of software.


Working with code in IntelliJ IDEA is a real joy. To quickly access files we change often we can add those files to Favorites tool window. Once a file is placed in Favorites we can use the shortcut key Cmd + 2 (Alt + 2 for Windows/Linux) to open the tool window and select a file.

To add a file in the Favorites tool window we have several options. We can right-click on the tab of the open file. IntelliJ IDEA shows a popup menu and we can select the option Add to Favorites. Then we can choose to add the file to an existing favorite list or create a new one. The default list has the same name as the project. In the following screenshot we see the name of the project is spring-config, so the default favorite list is also called spring-config:

We select the default list to add our file. If we open the Favorites tool window we can see the file is now added to the favorite list:

We can also use a shortcut key combination Option + Shift + F (Alt + Shift + F for Windows/Linux) if we have a file open. We see a dialog window where we can choose if we want to place the file in an existing favorite list, which by default is the name of the project, or we can choose to create a new list to store files:

Let's create a new favorite list and select the option Add to New Favorites List. IntelliJ IDEA show a new dialog window where we can fill in the name of our list:

If we now look at our Favorites tool window we can see the new list and we have a file in the default spring-config list and in the Configuration Files list:

Finally we can also use the mouse to move a file from the Project tool window to a favorite list. We can move the file to any favorite list and it will be part of that list:

IntelliJ IDEA 12.0.4 is used for this blog post.

The Performance Zone is brought to you in partnership with New Relic. Read more about providing a framework that gets you started on the right path to move your IT services to cloud computing, and give you an understanding as to why certain applications should not move to the cloud.


Published at DZone with permission of Hubert Klein Ikkink , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}