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 101212

Summary: rename refactoring deletes code
Product: javascript Reporter: Pavel Buzek <pbuzek>
Component: EditorAssignee: Daniel Prusa <dprusa>
Status: VERIFIED FIXED    
Severity: blocker CC: mschovanek
Priority: P1    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Pavel Buzek 2007-04-16 19:27:07 UTC
I have a javascript file with this content:
            function foo () {
            
            }
            function bar() {
            foo()
            }

I step on foo() (I tried both on the first line or on the 5th line) and I select
menu Refactoring | Rename. I get a dialog asking for name, I type something
("ahoj") and the result is that the whole file looks like this:
            ahojfunction bar() {
            foo()
            }
Comment 1 Daniel Prusa 2007-04-17 13:32:19 UTC
reproducible, bounds in refactoring element have to be set for function name only
Comment 2 Daniel Prusa 2007-04-17 13:33:54 UTC
*** Issue 101174 has been marked as a duplicate of this issue. ***
Comment 3 Daniel Prusa 2007-04-17 15:15:41 UTC
Fixed.
Comment 4 Radim Roska 2007-08-07 09:38:33 UTC
VERIFIED