Place the caret on the catch
keyword and press Ctrl+Shift+F7.
(Find
| Highlight Usages in File
). If you are using different keymap and the above shortcut doesn't work, use Help
| Find Action
to search for this action and see its keyboard shortcut:
If you want it to work automatically, enable Settings
| Editor
| Highlight usages of element at caret
.
The same works on try
and throws
keywords with a choice of exceptions to highlight.
Here is a screenshot from IntelliJ IDEA Tip of the Day:
Note that there is no way to highlight it by particular exception class until you select this class from the list of suggestions:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…