JavaRush /Java Blog /Random EN /IntelliJ IDEA User Guide. Navigation.
theGrass
Level 24
Саратов

IntelliJ IDEA User Guide. Navigation.

Published in the Random EN group
Navigation
Навигация это насколько легко вам переключаться между разными частями codeа, над которым вы работаете. Чем быстрее переключитесь, тем более вы продуктивны. Ниже мы приведем список важных возможностей среды разработки которые могут значительно облегчить вам навигацию по codeу.
  1. Recently Opened Files Most of the time you work with a finite number of files. This means that you need to constantly switch from one of them to the other, and as quickly as possible. A great time-saver is the menu item called “Recently Open Files,” also accessible by pressing Ctrl + E (Cmd + E for Mac) . By default, focus will be on the last opened file. In general, you can open any tool window using this menu item. IntelliJ IDEA User Guide.  Navigation.  - 1
      Another useful feature similar to "recently opened files" is "recently edited files", accessible by pressing Shift + Ctrl + E (Shift + Cmd + E for Mac) . This is the easiest way to get back to the code you were working on.
      • Structure If you are not switching between files, you are probably moving one file at a time. The fastest way to do this is to press Ctrl + F12 (Cmd + F12 for Mac) . A pop-up window will show you the structure of the file and allow you to quickly navigate to the item you need. Just, as usual, you don't need a mouse for this. Please note that quick search works here too. Pressing the keyboard shortcut a second time will allow you to view the inherited members. IntelliJ IDEA User Guide.  Navigation.  - 2
        • Switch Much like an operating system allows you to switch from one task to another, IntelliJ IDEA allows you to switch between open files and toolbars by pressing Ctrl+Tab . IntelliJ IDEA User Guide.  Navigation.  - 3
          • Going to the Navigation Pane Another useful feature worth mentioning is going to the Navigation Pane by pressing Alt + Home (Alt + ↖ for Mac) . The navigation bar at the top of the window is useless most of the time, so most often developers hide it and call it up with a keyboard shortcut when necessary. The navigation bar supports quick search and other features such as code generation, pop-up documentation, etc. IntelliJ IDEA User Guide.  Navigation.  - 4
            • Switching Between Methods If you need to quickly switch between methods, press Alt + ↑↓ (Ctrl + ↑↓ for Mac) . IntelliJ IDEA User Guide.  Navigation.  - 5
                A similar option for moving between paired brackets is called Ctrl + { and Ctrl + } (Cmd + { and Cmd + } for Mac) .
                • Jumping to something The next feature is practically one of the most used in IntelliJ IDEA - jumping to a class, file, or symbol. This feature is accessible by pressing Ctrl + N (Cmd + N on Mac) and allows you to use complex expressions including file paths, line number to go to, median match, and more. If you call this function twice, it will show you search results for all classes in the project. IntelliJ IDEA User Guide.  Navigation.  - 6
                    Just like with classes, it works with files, only it is called using the combination Ctrl + Shift + N (Cmd + Shift + N for Mac) . The result is sorted by the degree of matching the expression. IntelliJ IDEA User Guide.  Navigation.  - 7
                      And finally, the most tricky function is to move to a symbol using the keys Ctrl + Alt + Shift + N (Alt + Cmd + Shift + N for Mac) . The development environment constantly maintains a list of all symbols in the project (as well as in libraries) for quick identification and navigation. Thus, by writing an expression, you can quickly find the method or field you need. IntelliJ IDEA User Guide.  Navigation.  - 8
                      • Select In Finally, if you want to open a file in a specific tool window (or Explorer), you can do so using the Select In function by pressing Alt + F1 . IntelliJ IDEA User Guide.  Navigation.  - 9
                        • Other Important Features
                          • Go to line by line number using Ctrl + G (Cmd + G for Mac)
                          • In the panel to the left of the code collapse line, you can see icons of files associated with the current file.
                          • Go to definition using Ctrl + B (Cmd + B for Mac)
                          • Go to the ancestor of a class using Ctrl + U (Cmd + U for Mac)
                          • Jump to implementation using Ctrl + Alt + B (Alt + Cmd + B for Mac)
                          • Go to the last edited location using Shift + Ctrl + Backspace (Shift + Cmd + Backspace for Mac)
                          • Move to next error or warning location using F2
                          • Go to a unit test covering a given method using Shift + Ctrl + T (Shift + Cmd + T for Mac)
                          Original article
                        Comments
                        TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
                        GO TO FULL VERSION