Re: JavaOne 2010: Upcoming Java Features
Posted: Oct 5, 2010 11:25 PM
> > Eclipse has something similar (not the same) but even
> > better. You can select a method "someCalls()" and
> > "Extract to a local variable" refactoring. You don't
> > need to type the variable name :-)
> Hmm, close. I still need to select the expression (not
> just hover), remember the magic three key combo
> alt-shift-L, (I'm on Windows, YMMV) then stare at (or
> blissfully ignore) a dialog and hit Return. So it's not
> perfect but it's something to remember. Thanks!
Instead of Alt-shift-L, try control-2 L. It skips the dialog step and just guesses a good variable name, leaving that name selected so that you can change it.