intellij-ideastructural-search

IntelliJ IDEA: how to find all instance creation of a class?


abstract class Base {}

class A extends Base
class B extends Base

How do I find all places in the code that create Base? (that is, have either new A() or new B())

UPDATE
To make it clear, the above is just and example. I'm interested in a way of searching for object creation of any class, including 3rd party classes that I don't control.


Solution

  • Using Structural Search (Edit -> Find -> Search Structurally):

    Voila!