This is with 6.0.4.
I frequently have code that looks like:
where I want to turn 123 into a constant since I think that is better style.
But when I position the caret on either foo (the variable name) or 123 (the variable default value) and choose Refactor -> Introduce Constant, I am greeted with the following error:
"Cannot perform refactoring. The caret should be positioned at the name of the local variable to be refactored."
This is strange since 'Introduce Constant' should apply to the value assignment, not to the variable name.
What I expected IDEA to do is to create this following code:
where I can overwrite CHANGE_ME as with a live template.
Or am I understanding this refactoring completely wrong here?