Performance Zone is brought to you in partnership with:

Hi all, my name is Hubert A. Klein Ikkink. Not a very common name, right? To make things easier I just picked the first letters of my firstname and surname and came up with haki. So there you have it, now I am also known as Mr. Haki or mrhaki for short. You can read more blog postings at www.mrhaki.com. I am a passionate Groovy and Java developer based in Tilburg, The Netherlands. My goal is to write clean, elegant, user-centered and high quality software. You can find me on Google+ and Twitter. Hubert is a DZone MVB and is not an employee of DZone and has posted 126 posts at DZone. You can read more from them at their website. View Full User Profile

Using Favorites in IntelliJ IDEA to Quickly Access Files

03.04.2013
| 1528 views |
  • submit to reddit

 

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.

Published at DZone with permission of Hubert Klein Ikkink, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)