Community
Participate
Working Groups
Create a method with at least 2 local variables, which are referenced in the method several times. Select one via code assist and it says "Rename in file". It works the first time. Don't save the file. Select second variable, and it doesn't highlight the other references and renaming only changes the instance and not the other references. Save the file. Select second variable and it still doesn't highlight the other references and renaming only changes the instance and not the other references. Close the file and reopen it. Select the second variable and it works now. Alt-Shift-R does work without needing to save or reload the file.
to be invetigated
can't reproduce. Please add a code example where this happends. My example was: public class A { private void foo() { int loc1; int loc2; loc1= 0; loc2= 0; loc2 += loc1; } }
I used the same code as yours. And I'm still getting the error. If I don't save the file after doing a local variable rename, then I can't do another local variable rename using the Content-Assist. When I call Refactor / Rename local variables, it will work reliably
Strange, it really works for me. What build are you using? Do you have more precice steps? These are mine - Select the first local variable with a doubleclick - CTRL + 1, Rename in file - Enter 'a' as new name - Double click on second local variable, CTRL + 1, Rename in local - All occurences of 'loc2' are linked
As of 3.1M2, the problem is fixed, so I'm closing this bug.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.