title: Structural find and replace IntelliJ
body: <p>I need to search for occurrences of a method, change the name, preserve the method body, add an annotation to the method, and ensure that the annotation is imported.  I need to do this in multiple classes project wide.</p>
  
  <p>The docs just are not making sense to me, can anyone please shed light on this feature and how I might accomplish the following using IntelliJ's Structural Find and Replace feature?</p>
  
  <pre><code>import a;
  import b;
  import c;
  
  public class SomeClass extends SomeAbstractClass implements SomeInterface {
  
      @Override
      public void someMethod() {
          methodbody.getMoreBody();
      }
  }
  </code></pre>
  
  <p>convert to</p>
  
  <pre><code>import a;
  import b;
  import c;
  import some.package.with.annotation;
  
  public class SomeClass extends SomeAbstractClass implements SomeInterface {
  
      @Override
      @annotation
      public void newMethodName() {
          methodbody.getMoreBody();
      }
  }
  </code></pre>