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 180491 - Refactor > Rename on .js files
Summary: Refactor > Rename on .js files
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-09 07:22 UTC by Martin Schovanek
Modified: 2011-12-13 07:12 UTC (History)
1 user (show)

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 Martin Schovanek 2010-02-09 07:22:42 UTC
[#201002080200, jdk1.6]

to reproduce:
-------------
1) have a test.js file like:
   function hello() {}
   function hello2() {}
2) invoke: Refactor > Rename on the file
ERROR1: there is filled 'hello' in the New Name filed instead of: 'test'
3) type a new file name and choose Preview
ERROR2: the hello() function is renamed together with the file name
Comment 1 Petr Pisl 2010-02-09 10:38:34 UTC
This bug is funny, the implementation is done in the way as is describe in this issue. It's intentionally. On the other hand I don't agree with the current implementation. So I have changed the implementation in the way that the rename dialog offers the name of the file and if there is an element (function) in the file, which has the same name like the file, then it's also suggested to rename. 

IMHO the action should work in the way that will rename just the file and all occurrences of the file in the project. Unfortunately it's not now possible without introducing indexing in html language. 

changeset:   159563:7f6464e78f2c
Comment 2 Quality Engineering 2010-02-10 02:21:45 UTC
Integrated into 'main-golden', will be available in build *201002100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/7f6464e78f2c
User: Petr Pisl <ppisl@netbeans.org>
Log: #180491 -  Refactor > Rename on .js files
Comment 3 Vladimir Riha 2011-12-13 07:12:28 UTC
v.