Find all method calls with a specific parameter type with IntelliJ
<p>I have this code base which is rather big ( +/- 500k lines). I'm looking in it to find all the method calls that use a single parameter and that parameter is a specific type.</p>

<p>This means, I want to be able to find method calls like the following:</p>

<pre><code>public class Foo { }
public class Bar { }

public class Doer{
  public void doSomethingFoo(Foo foo) {  }
  public void doSomethingObject(Object object) {  }
}

public class Usage {
  Doer doer = new Doer();
  public doSomething() {
    Foo anObject = new Foo();
    Bar bar = new Bar();

    doer.doSomethingFoo(anObject);
    doer.doSomethingObject(anObject);

    doer.doSomethingObject(bar);
  }
}
</code></pre>

<p>Since both <code>doer.doSomethingFoo(anObject)</code> and <code>doer.doSomethingObject(anObject)</code> are called, both those statements should be returned by the search. Similarly, <code>doer.doSomethingObject(bar)</code> is not returned. Of course, I don't know that <code>doer</code> exists. </p>

<p>I'm trying to use the Structural Search of IntelliJ to do so. I've used the following template <code>$Instance$.$Method$($Parameter$)</code>, with the following parameters:</p>

<pre><code>$Instance$  -&gt; Text/regexp   = .*
$Method$    -&gt; Text/regexp   = .*
$Parameter$ -&gt; Text/regexp   = Foo
               Minimum count = 1     // Minimum one Foo parameter
               Maximum count = 1     // Maximum one Foo parameter
</code></pre>

<p>This returns everything that has a parameter named <code>foo</code> (case-insensitive, apparently). So I'm probably doing something wrong here. But what? How can I get all calls to any method where the only param is of type <code>Foo</code>?</p>