Basil Bourque :
Is there a way for IntelliJ to locate all the places in my code that define an anonymous class?
I am asking just about finding, not changing. I am not asking about converting to lambdas, lambdas are irrelevant here.
Strelok :
Yep. You can use the Structural Search feature.
Edit -> Find -> Search Structurally…
There is already a default template for "Anonymous Classes".
- Click
Existing Templates
- Under
Java -> Class-based
chooseanonymous classes
- Click
OK
- Tweak the search options (if you need) and click
Find