Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
width33%
Align
alignleft
Previous
span
classsep
|
span
classtext
Folding
Table Cell (td)
width33%
Align
aligncenter
Top
span
classsep
|
span
classtext
Quick Start
Table Cell (td)
width33%
Align
alignright
Next
span
classsep
|
span
classtext
Inspections

...

Wiki Markup
{div:class=navigation}
{table:width=100%}
{tr}
{td:width=33%}{align:left}[Previous|Folding] {span:class=sep}\| {span}{span:class=text}Folding{span}{align}{td}
{td:width=33%}{align:center}[Top|Quick Start] {span:class=sep}\| {span}{span:class=text}Quick Start{span}{align} {td}
{td:width=33%}{align:right}[Next|Inspections] {span:class=sep}\| {span}{span:class=text}Inspections{span}{align} {td}
{tr}
{table}
{div}

Wiki Markup
{redirect:https://www.jetbrains.com/idea/help/searching-through-the-source-code.html

...

|delay

...

=0}

Info
iconfalse

Find usages helps you quickly find all pieces of code referencing a symbol at the caret, no matter if the symbol is a class, method, field, parameter, or another statement.

1. Find usages

Just press

span
classshortcut
Alt
+ F7
span
classshortcut
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
and get a list of references grouped by type of usage, module and file. This feature is fast and gets you the first results almost immediately. More results appear as the IDE finds them.

...

By default the results are not grouped by usage type, but you can enable this by pressing

span
classshortcut
Ctrl
+
span
classshortcut
Alt
+ T
span
classshortcut
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}T{span}
or by clicking the corresponding button on the sidebar.

...

If you want to set custom options for the Find Usages algorithm, you can use

span
classshortcut
Shift
+
span
classshortcut
Alt
+
span
classshortcut
Ctrl
+
span
classshortcut
F7
(
span
classshortcut
Shift
+
span
classshortcut
Alt
+
span
classshortcut
Cmd
+ F7
span
classshortcut
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
(
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Cmd{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
for Mac) or click the first button on the right panel with search results.

...

If you want to keep the results of previous searches, tell the IDE to open new results in a new tab by checking the

Open in new tab
span
classshortcut
Wiki Markup
{span:class=shortcut}Open in new tab{span}
option.

4. Quick popup

If you want to see the results quickly without leaving the editor, simply press

span
classshortcut
Alt
+
span
classshortcut
Ctrl
+
span
classshortcut
F7
(
span
classshortcut
Alt
+
span
classshortcut
Cmd
+ F7
span
classshortcut
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
(
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Cmd{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
for Mac).

5. Highlight usages, return and throw statements

...

However, many developers prefer disabling this feature by deselecting

span
classshortcut
Settings
span
classshortcut
Editor
Highlight usages of element at the caret
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
Wiki Markup
{span:class=shortcut}Editor{span}
Wiki Markup
{span:class=shortcut}Highlight usages of element at the caret{span}
and calling it via
span
classshortcut
Shift
+
span
classshortcut
Ctrl
+
span
classshortcut
F7
(
span
classshortcut
Shift
+
span
classshortcut
Cmd
+ F7
span
classshortcut
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
(
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Cmd{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
for Mac) instead, only when you need it. This way you can highlight more than one symbol if you want, and to remove the highlighting by simply pressing Esc
span
classshortcut
Wiki Markup
{span:class=shortcut}Esc{span}
.

6. Highlight implemented and overridden methods

Another useful aspect of highlighting usages in IntelliJ IDEA is that you can easily find the methods that are overridden or implemented for a particular class or interface. Just put the caret at the implements or extends statement and press

span
classshortcut
Shift
+
span
classshortcut
Ctrl
+
span
classshortcut
F7
(
span
classshortcut
Shift
+
span
classshortcut
Cmd
+ F7
span
classshortcut
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
(
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Cmd{span}
+
Wiki Markup
{span:class=shortcut}F7{span}
for Mac). If there are multiple classes or interfaces, you will be asked whose methods to highlight.

div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
width33%
Align
alignleft
Previous
span
classsep
|
span
classtext
Folding
Table Cell (td)
width33%
Align
aligncenter
Top
span
classsep
|
span
classtext
Quick Start
Table Cell (td)
width33%
Align
alignright
Next
span
classsep
|
span
classtext
Inspections Wiki Markup
{div:class=navigation}
{table:width=100%}
{tr}
{td:width=33%}{align:left}[Previous|Folding] {span:class=sep}\| {span}{span:class=text}Folding{span}{align}{td}
{td:width=33%}{align:center}[Top|Quick Start] {span:class=sep}\| {span}{span:class=text}Quick Start{span}{align} {td}
{td:width=33%}{align:right}[Next|Inspections] {span:class=sep}\| {span}{span:class=text}Inspections{span}{align} {td}
{tr}
{table}
{div}