Oops, sorry - a bit quick on the send key there!
 
A couple of things I've noticed while using the "introduce field" refactoring:
 
Firstly, I tried introducing a variable using a key mapping (ctrl-alt-V). This only works if the whole variable name is selected, otherwise the current line gets selected and I get a message telling me that the selected block should represent an expression.  This is inconsistent with Move (shift-F6), which works out the field name based on where the cursor is.
 
Secondly, if you introduce a variable, then use the "convert local to field" refactoring, you don't get to choose things like visibility (private, public, etc) or modifiers (static, final).  If you introduce a field based on a constant value, then you get the full dialog.  Also, my key mapping for "introduce field" has the same annoying behaviour whereby I have to have selected the variable rather than just having the cursor there.
 
Really minor, but really irritating when you're introducing a LOT of fields!
 
Cheers,
Dan/tastapod
 

Reply via email to