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.

Bug 168123 - double-rename of local variable
Summary: double-rename of local variable
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-04 18:28 UTC by acfbuerger
Modified: 2014-08-29 09:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description acfbuerger 2009-07-04 18:28:18 UTC
Hi,

when renaming a local variable, the names were changed inconsistently leading to incorrect code.

The problem was triggered by accident: first I pressed Ctrl-R, but I did not notice that these litte squares appear and
that I can just type in the new name. So I right-clicked to get Refactor/Rename... from the context menu. After renaming
with the dialog, e.g. from "a" to "au", the first appearance was renamed correctly, but the further appearances were
renamed to "auau".

The little-square renaming should probably be canceled automatically before the menu-renaming starts.

Best wishes,

Alexander
Comment 1 Jan Lahoda 2009-08-20 09:59:50 UTC
Reassigning all moonko's java/source bugs to myself.
Comment 2 Svata Dedic 2014-08-29 09:47:05 UTC
Works OK in the latest dev version. I've invoked dialog-based Refactor-Rename while the in-place rename regions were active. After confirmation, both occurrences of the identifier were renamed.

If you still can reproduce the defect, please provide the exact code -- possibly in-place and "great" refactoring may differ in the places they identify as targets of the rename operation.