Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find usages of lombok generated getter/setter in Intellij

I have a field with lombok annotation (@Setter) and I am looking for an easy way to find usages of the auto generated setter.

When I put the cursor on the @Setter annotation and run Find usages (Alt+F7) I obviously get all the places where @Setter annotation is used (the result is all classes which contains lines with @Setter)

However I would like to find all places where this concrete setter, for this concrete field is used (I expect all classes which contains lines with setSomething(...) as a result)

I have Annotation Processing enabled (checkbox "Enable annotation processing" inSettings->Compiler->Annotation Processors is checked).
I also have Lombok plugin installed and it works fine.

like image 224
luke Avatar asked May 07 '19 10:05

luke


People also ask

What is Lombok in IntelliJ?

Lombok is a library that facilitates many tedious tasks and reduces Java source code verbosity. Of course, we usually want to be able to use the library in an IDE, which requires additional setup. In this tutorial, we'll talk about configuring Lombok in two of the most popular Java IDEs — IntelliJ IDEA and Eclipse.


1 Answers

You should put the cursor on field, not on @Setter annotation

like image 184
Kamil Avatar answered Sep 24 '22 16:09

Kamil