If I have a constant BAR in Foo, which I will use in a class C I'll have to write
Object o = Foo.BAR + "...";
which I can use Ctrl-Shift-M in Eclipse to create a static import for like:
import static Foo.BAR;
Object o = BAR + "....";
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?
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 :) )