Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find usages for enums via Ctrl + left in IntelliJ

In IntelliJ I can very easily find usages of an enum constant by Ctrl + left click on an enum constant. However, if the enum implements a constructor, I'm going directly to that constructor instead.

I know I can also search for usages with Alt + F7 but is it possible to always do that on Ctrl + left click even if there is a constructor?

like image 938
Sebastian Avatar asked Apr 26 '18 18:04

Sebastian


People also ask

How do I see usages in IntelliJ?

In the editor, select a symbol for which you want to see the usages. From the main menu, select Edit | Find Usages | Show Usages In Code Ctrl+Alt+F7 . The usages window shows the current scope and total count of usages. If you want to quickly switch to the default scope, press Ctrl+Alt+F7 .

How do I search everywhere in IntelliJ?

Use ⇧⇧ (macOS), or Shift+Shift (Windows/Linux), to bring up the Search Everywhere dialog. You can search across Classes, Files, Symbols and Actions. You can also use forward slash to filter the results to a specific area, such as /editor.

How can I see all class methods in IntelliJ?

By default, IntelliJ IDEA shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar. to show class fields. to have protected class members shown in the tree.

How do I get to method definition in IntelliJ?

In IntelliJ IDEA, you can see where and how symbols, such as tags, classes, fields, methods, or functions are defined in your project. For this purpose, the IDE features the Quick Definition popup. To view definition of a symbol, select it in the editor and press Ctrl+Shift+I (or click View | Quick Definition).


1 Answers

In the editor, select a symbol for which you want to see the usages. From the main menu, select Edit | Find | Show Usages Ctrl+Alt+F7. The usages window shows the current scope. If you want to quickly switch to the default scope, press Ctrl+Alt+F7

Source: https://www.jetbrains.com/help/idea/find-highlight-usages.html

like image 83
Paul Atrides Avatar answered Oct 06 '22 15:10

Paul Atrides