Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Find usages helps you quickly find all pieces of code referencing a symbol at caret, regardless to either the symbol is class, method, field, parameter, or other statements.

1. Find usages

Just press Alt + F7 and get a list of references grouped by type of usage, module and file. This feature is pretty fast and get you the first results almost immediately. More results appear as the IDE finds it.

By default the results are not grouped by it type but you can enable it by pressing Ctrl + AltT

or with help of the corresponding button in the toolbar window.

2. Options

If you want to specify custom options for find usages algorithm you can use Shift

+ Alt + Ctrl + F7 (Shift + Alt + Cmd + F7 for Mac) or click the first button on the right panel with search results.

3. Open in a new tab

If you wish to keep results of the previous searches you can specify to open results in a new tab by checking Open in new tab option.

3. Quick popup

If you want to see the results quickly without leaving the editor just press Alt + Ctrl + F7 (Alt + Cmd + F7 for Mac) shortcut.

4. Highlight usages, return and throw statements

By default IntelliJ IDEA highlights the usages of a symbol, return or throw statement at caret within the opened file in the editor.

However many developers recommend to disable this feature by unchecking SettingsEditorHighlight usages of element at caret and call it via Shift + Ctrl + F7 (Shift + Cmd + F7 instead only when you need it. This way you can highlight more than one symbol if you want and remove the highlighting by simply pressing Esc.

5. Highlight implemented and overridden methods

One more useful aspect of the highlighting usages in IntelliJ IDEA is that you can easily find the methods overridden or implemented for a particular class or interface. Just put the caret at implements or extends statement and press Shift + Ctrl + F7 (Shift + Cmd + F7. If there is more than one class or interface it will ask you methods of which one to highlight.

  • No labels