How can I use Structural Search to find Actionscript functions with a specifically-named parameter?

Suppose I've got several functions in my Actionscript class, each of which has a parameter named foo somewhere in its parameter list:

function func1(foo : String) : void

function func2(bar : String, foo : String) : void

function func3(bar : String, fizzbuzz : int, foo : String) : void


Is there a way I can use Structural Search to find all of these?

I've tried doing a Structural Search for function $FuncName$($Parameters$) : $ReturnType$ with a constraint on $Parameters$ set to foo or .*listVar.*, but neither worked.  What am I missing?

0
2 comments

Please try the following search template:

 
function $FuncName$($Parameters$, $ParameterFoo$, $Parameters$) : $ReturnType$

$Parameters$: minimum count:0, maximum count:unlimited
$ParameterFoo$: minimum count:1, maximum count:1, text/regexp:foo

Does it work for you?

0

SergeySimonchik wrote:

Please try the following search template:

function $FuncName$($Parameters$, $ParameterFoo$, $Parameters$) : $ReturnType$

$Parameters$: minimum count:0, maximum count:unlimited

$ParameterFoo$: minimum count:1, maximum count:1, text/regexp:foo

Does it work for you?


Yes!  Thank you very very much!

Rob

0

Please sign in to leave a comment.