title: A simple way to create static imports for constants in existing code?
body: <p>If I have a constant BAR in Foo, which I will use in a class C I'll have to write</p>
  
  <pre><code>Object o = Foo.BAR + "...";
  </code></pre>
  
  <p>which I can use Ctrl-Shift-M in Eclipse (with the cursor on BAR) to create a static import for like:</p>
  
  <pre><code>import static Foo.BAR;
  
  Object o = BAR + "....";
  </code></pre>
  
  <p>I am current updating legacy code with literaly thousands of these I'd like to convert to static imports.  Ctrl-Shift-O / Organize imports does not do it.  Is there a trick I've missed?</p>
  
  <hr>
  
  <p>EDIT:  Actually, what I would prefer is a way to tell Eclipse that I want to have Ctrl-Shift-M do its magic on ALL instances in this particular class instead of just the single instance I have the cursor placed at.    (It is legacy code so this actually IMPROVES readability :) ) </p>
  
  <hr>
  
  <p>EDIT:  I've found that IntelliJ suggest doing this.</p>