Find use of lombok created constructor in Intellij

I have a class with lombok annotation (either @Valueor @Data), and I'm looking for an easy way to find the use of an automatically created constructor.

Now I can find one use of the constructor, place the cursor there and run the "Find Usages" command, and I get the results that I want.

However, I would like to do this directly from the class declaration. Is there any way to do this?

+4
source share
3 answers

I finally found an acceptable solution:

  • The file structure action is invoked anywhere in the file (Ctrl + F12 on linux)
  • (, Lombok builder(), @Builder).
  • " " (Alt + F7 linux)
+3

, , . Copy existing template... new expressions:

new $Constructor$($Argument$)

, /regexp Constructor .

+1

( ). IDEA , . " ".

IDEA Ultimate 2016.3 lombok.

+1

Source: https://habr.com/ru/post/1650039/


All Articles