In Eclipse, you can focus on class XXX and press Ctrl+Alt+H, to get a call hierarchy showing everywhere that new XXX(...)
is called.
In IntelliJ IDEA, I can only do this on each constructor separately, and I can't do it at all on the default constructor (invisible).
Is there a way in IDEA that I'm missing? (Ultimate 12.1.3)
If I'm understanding your question correctly - one way you can do this is to select the classname (instead of an individual constructor name) and press Alt+F7 (Find usages).
This will find all usages of that class - the "Found Usages" window that will be displayed is split up into expandable sections, one of which will be "new instance creation".
NOTE: if you can't see a New instance creation
grouping, makes sure Group by usage type
is enabled (the "funnel" looking icon in the screen shot below).
In IDEA 2017.2, it looks like this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With