The search command or ) makes it possible to visualize usages of a symbol in the current file. In particular, it is possible to highlight implemented methods of interfaces. All found usages of a symbol in the current file are highlighted and color-coded, as defined in the Colors and Fonts settings page, to represent read or write access to the symbol. In addition to the highlights of occurrences in text, the stripes of the same colors appear in the marker bar, accompanied with tooltips.(
The behavior of usage highlighting is configurable: you can make IntelliJ IDEA show usages of a symbol at caret automatically, or invoke it with a command.
This section describes how to:
- configure highlight usages behavior
- highlight usages
- highlight implemented methods
- navigate among usages
- remove highlighting
- Place the caret at the selected symbol in the editor. If automatic usages highlighting is enabled, see all its occurrences in the current file highlighted. Otherwise, proceed to the next step.
- On the main menu, choose or . , or press
- In a class that implements one or more interfaces, place the caret at the implements keyword in the class declaration.
- On the main menu, choose or . A list of implemented interfaces shows up:
- Select the interface, whose methods you want to highlight, and press .
- Click on a stripe in the marker bar to navigate to the respective usage location.
- Use or or or or or or or and or or or or , or or or or keyboard shortcuts, to navigate to the next and previous usages respectively.