I have a method in my Service class which executes an hibernate update for any domain object:
update(Object obj)
It's called from lot's of classes in my project for different kind of objects. I would like to find all usages of this method when it's called for a specific domain object. I.e. call methods call wich executes an update of my Title object:
serviceClass.update(Title title)
I'm using IntelliJ as my IDE and I'm wondering if there is a way to find all those usages. Does anyone have an IDEA how to do this?
Thanks a lot in advance, Ronny
I've tried it with a small sample project and was able to achieve the desired behavior using Structural Search and Replace feature with the modified
method calls
template:$MethodCall$
Text constraints, Text/regexp should be set toupdate
so that methods with other names are ignored.$Parameter$
Occurrences count, Minimum count should be set to1
to ignore method calls with no or more parameters.Results: