How do I search for usages of a generated member, ...
# intellij
c
How do I search for usages of a generated member, e.g.
.name
generated by an enum?
👀 1
t
I just tried this on IntelliJ IDEA 2026.2.3 (IU-262.10968.63).
name
is inherited from
kotlin.Enum
, so in my test Find Usages included usages from both enum types.For a specific enum, use Edit | Find | Structural Search with the language set to Kotlin, the scope set to In Project, and the template
$e$.name
. Then add a Type modifier to
$e$
and enter the enum type. Does this work for you?
🧠 3
c
Wow, I've never seen this feature before. How do I set the type modifier?
t
Click on
$e$
in the search template first. The right panel will then show
Add modifier
. Click it, choose
Type
, and enter your enum type, for example
Color
. If
Find
is disabled, the template doesn't match anything in the project yet, so make sure the project contains a
.name
call on an enum.
c
That works, thanks!
👍 1