Can I do this with Structural Search?
The goal: find all calls of a static method "foo" on any classes derived from BaseClass.
I have a BaseClass that has many many derived classes (D1, D2, ... Dn). Each of the derived classes has its own static method called "foo" with a varying number of arguments. The name of the method is the same in all cases, but the signatures are totally different (different arguments)
I want Structural Search to find all occurences of (D1,D2...Dn).foo($anyargs$). I tried the following template:
$Instance$.$method$($arg$)
(This was copied from the standard template.)
$Instance$: Text constraint "BaseClass", applied w/in type hierarchy
$method$: Text constraint "foo", 1 occurance
$args$: no text constraint, unlimited occurence count
This partially works if I remove the $Instance$ constraint: It finds all methods named "foo". But that's too general, as there's other classes/instances that have methods called "foo" on them.
I'm beginning to think that Structural Search only works for instance methods, not static methods. In which case it can't help me. True?
Please sign in to leave a comment.
Hi,
Seems like a bug, will fix shortly
jpelly wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
http://www.jetbrains.net/jira/browse/IDEADEV-6705
jpelly wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"