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.
[#20080402075347 continuous build, jdk1.5.0] to reproduce: ------------- 1) type in a .js (| represents cursor): var xx|x="Ahoy"; alert(xxx); 2) choose Refactor > Rename and rename the xxx to bbb ERROR: the alert() xxx parameter is not renamed! The result is: var bbb="Ahoy"; alert(xxx);
Fixed by changeset 518d649511c9 . Martin S, do you agree to including this in 6.1? Martin A, can you review the diffs? Explanation of the fix: When doing a rename of a local variable, I want to skip Token.NAME nodes that correspond to call names, since these aren't variables, they just reflect the fact that a Token.NAME node is used both for variable references and to name a call. However, the problem was that I was only looking at the parent node to see if it was a call. Only the -first- child of a call node names the call. Any subsequent children are actual function parameters - and these can be local variable reads as is the case in this bug. So, the fix simply tightens the call-check to also ensure that we're only skipping this node if it is the -first- child of a call node.
Looks good to me.
Verified in a trunk build, please integrate into the 6.1.
Fixed in trunk and 6.1.
Verified.
move back to consistent state RESOLVED/FIXED