There’s lots more that you can do with keyboard shortcuts in IntelliJ IDEA, but these are our top 5 navigation shortcuts that will help you to move around your project quickly and efficiently.GoLand includes several predefined keymaps and lets you customize frequently used shortcuts. We can use the same shortcut again to navigate back to our class as required. Now we can now go ahead and write our tests.
IntelliJ IDEA gives us the option of generating helper code for the methods that we want to add tests for.
Using our BananaCheck class, we can place the caret on the class name and use ⌘⇧T on macOS or Ctrl+ Shift+ T on Windows /Linux to generate a test class. If we select the other usage, IntelliJ IDEA will take us to the location within the class.Ĭreating tests and adding to existing test classes is a very common requirement. We can see that there are two usages including the one we’re currently investigating. We can use use ⌥F7 on macOS, or Alt+ F7 on Windows and Linux to find the usages for our isEmployed method. It answers the question ‘what called me’? It looks for where a specific implementation is used. If there is only one implementation, IntelliJ IDEA will take you straight there without the additional prompt.įind Usages can also be used for both classes and methods and takes the opposite approach to Navigate to Declaration. We can use ⌥⌘B on macOS, or Ctrl+ Alt+ B on Windows and Linux to navigate to one of four implementations. In our CustomerRepository interface the gutter icons show us that these methods are implemented elsewhere. Navigate to Implementation can be used for both classes and methods and is very useful when you have multiple implementations. Again, you can navigate around this dialog and type your search query straight in. You can also use Recent Files to display windows that don’t have keyboard shortcuts associated with them, for example, Maven.Īlongside Recent Files, we can also use ⌘⇧E on macOS, or Ctrl+ Shift+ E on Windows and Linux to bring up the Recent Locations dialog. You can navigate around this dialog with the arrow keys and use the same shortcut again to filter the list to changed files only.Īs with any IntelliJ IDEA dialog, you can type your search directly in to filter the results, for example, JavaAt25. You can view the Recent Files dialog at any time by using ⌘E on macOS, or Ctrl+ E on Windows and Linux to display the Recent Files dialog. You can toggle IntelliJ IDEA functionality on, or off, from this dialog. Search Everywhere also supports filtering commands like (forward slash) plugins or (forward slash) editor (show line numbers). You can type in what you want to search for, for example, Navigate. Pressing the same shortcut again toggles the checkbox toggles the contextual check box in the top right corner. It searches across Classes, Files, Symbols and Actions.
You can use Search Everywhere anywhere inside IntelliJ IDEA by pressing ⇧⇧ on macOS, or Shift+ Shift on Windows/Linux to bring up the Search Everywhere dialog. Search everywhere helps you find exactly what you need quickly, even if you don’t know the keyboard shortcut for it. Search Everywhere is very powerful and is useful for both experienced users and new users to IntelliJ IDEA.
Find Usages – ⌥F7 on macOS, or Alt+ F7 on Windows/Linux.Navigate to Implementation – ⌥⌘B on macOS, or Ctrl+ Alt+ B on Windows/Linux.
Recent Files – ⌘E on macOS, or Ctrl+ E on Windows/Linux.Search Everywhere – ⇧⇧ on macOS, or Shift+ Shift on Windows/Linux.This provides an easy way for people to skim the content quickly if they prefer reading to watching, and to give the reader/watcher code samples and links to additional information. This blog post covers the same material as the video. This post shows you five shortcuts that help you to navigate around IntelliJ IDEA quickly and efficiently.