title: How to add @Deprecated to every Class and every Constructor/Method of every class?
body: <p>I have some legacy code and I want to mark all of them and all of their methods <code>@Deprecated</code> so that as we go and touch them we can remove these annotations so we can keep track of what has been modernized and what still is <em>bad</em>.</p>
  
  <p>I am trying to use the <code>Structural Search/Replace</code> and can't seem to get the correct template going.</p>
  
  <h3>Search Template</h3>
  
  <pre><code>class $Class$ { 
    $ReturnType$ $MethodName$($ParameterType$ $Parameter$) { $Stmt$; }
  }
  </code></pre>
  
  <h3>Replace Template</h3>
  
  <pre><code>@Deprecated
  class $Class$ {
    @Deprecated
    $ReturnType$ $MethodName$($ParameterType$ $Parameter$) { $Stmt$; }
  }
  </code></pre>
  
  <h3>But this removes everything else that is in the class.</h3>
  
  <pre><code>@Deprecated
  class OldAndCrusty {
    @Deprecated
     ( );
  }
  </code></pre>
  
  <p>This strips off all the visibility modifiers and final modifiers of all the classes it matches.</p>
  
  <h2>How do I replace these things and leave the rest of the code alone?</h2>