Is there a way (intention action / refactoring / plugin ) to have IDEA automatically replace all usages of a deprecated method call with a user supplied one?
There is an inspection that let's you use a structural search and replace. Depending how complex the original and replacement calls are it can be probably tweaked into doing this. See Project Settings -> -> Errors -> General ->]]> Structural Search Inspection
Chances are the feature of Idea can do what you want, but you have to ask on the forum for the exact replace template for your specific job, because the implementation is both powerful and lacking in usability.
Nick Pratt wrote:
Is there a way (intention action / refactoring / plugin ) to have IDEA automatically replace all usages of a deprecated method call with a user supplied one?
The Migrate refactoring might be enough for your needs. Years ago I used it to migrate from the JDK 1.1 Collections package to the Java 2 Collections and it worked quite well then.
There is an inspection that let's you use a structural search and replace.
Depending how complex the original and replacement calls are it can be
probably tweaked into doing this.
See Project Settings -> -> Errors -> General ->]]> Structural Search Inspection
Chances are the feature of Idea can do what you want, but you have to ask
on the forum for the exact replace template for your specific job, because
the implementation is both powerful and lacking in usability.
Nick Pratt wrote:
The Migrate refactoring might be enough for your needs. Years ago I used it to migrate from the JDK 1.1 Collections package to the Java 2 Collections and it worked quite well then.
Bas