find usages of method X of field Y
I was wondering if the following is possible with IDEA:
for example there is a hashmap as a field in some class, and you want to find out of which type the keys/values are (yes, old syntax with no generics in this example), so you do a find usages search to find the places where the .put method is used.
But of course now you have to inspect all results until you find a usage.
Would it be possible to directly search for "usages of method X of field Y"?
Thanks...
Please sign in to leave a comment.
Structural Search will help you
Michael Damberger wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
yes, but how? ;)
Ideally, you could give me a step by step instruction - or maybe an existing structural search template?
struct search seems to be so powerful, but I don't know how to use it...
thank you
Something like following:
$Instance$.fieldY.methodX($Params$)
$Instancee$ can be absent -> occurence count 0 or 1
$Params$ occurence count = count of arguments for methodX
Michael Damberger wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"