This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
There are two styles of 'rename' functionality, one that uses a refactor popup and another that simply highlights the text/variable being renamed and all instances are changed as you type. This defect is for the latter. When an instance of the variable I'm renaming is in an 'if' conditional, and a space precedes it, the selection of that instance is off by a character. The space before the word is included in the selection being changed, while the last character of the name is not. This is a big problem because this then causes the variable to not be renamed properly (the last character is duplicated), which can then lead to subtle problems with the code and hours of wasted time debugging. Attachment to follow.
Created attachment 62166 [details] simple code showing wrong selection in 'if' during 'rename'
Thank you! The problem had to do with spaces inside the left parenthesis of an if conditional expression. I've fixed the problem and have added unit tests for this scenario. Changeset: a7a08e5b21b8 The fix will appear in build #2104 or later from http://deadlock.netbeans.org/hudson/job/trunk/
v.
The fix has been ported into the release61_fixes branch: http://hg.netbeans.org/release61_fixes/a579e6e30351