Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the usages of a Scala class'es constructor in IntelliJ?

Is there a possibility to find the usages of a Scala class'es constructor in IntelliJ?

When using "Find Usages" on such constructor, it also applies to every usage of the class'es signature (since the signature is shared between the class and its constructor).

like image 308
Eyal Roth Avatar asked Aug 08 '16 17:08

Eyal Roth


2 Answers

You can do this in IDEA(my version is 2020.2.4) Find Usages Settings...:

enter image description here

like image 139
Yankai Zhang Avatar answered Oct 11 '22 13:10

Yankai Zhang


I don't think IDEA allows you to do it directly, but you can kind of achieve this by temporarily adding a new parameter, compiling and looking at errors (this will "find" pattern matches using this class as well).

like image 23
Alexey Romanov Avatar answered Oct 11 '22 14:10

Alexey Romanov