Intention Action to replace deprecated method call?

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?

2 comments
Comment actions Permalink

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?

0
Comment actions Permalink

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

0

Please sign in to leave a comment.