Bug 121268 - Rename at function declaration
Rename at function declaration
Status: VERIFIED FIXED
Product: javascript
Classification: Unclassified
Component: Editor
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Daniel Prusa
issues@javascript
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-06 10:31 UTC by Martin Schovanek
Modified: 2009-02-27 14:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2007-11-06 10:31:33 UTC
[#200711041200,, jdk1.5.0]

to reproduce:
-------------
1) type in a .js:
function f|n(x) {
    fn(x-1);
}
NOTE: the | char represents cursor
2) chose Refactor > Rename
ERROR: IDE throws 'Cannot perform rename on selected component'
Comment 1 Daniel Prusa 2007-11-06 10:35:12 UTC
General problem in retrieving usages from database. It has also an impact on occurences highliting and go to declaration
method.
Comment 2 Daniel Prusa 2007-11-07 15:27:21 UTC
Fixed in trunk. We should integrate the fix into nb 6.0 too, I suggest to increase priority to P1.


/cvs/languages/engine/src/org/netbeans/modules/languages/features/TokenHighlightsLayer.java
new revision: 1.9; previous revision: 1.8
/cvs/languages/engine/src/org/netbeans/modules/languages/features/UsagesASTEvaluator.java
new revision: 1.7; previous revision: 1.6
/cvs/languages/engine/src/org/netbeans/modules/languages/features/DatabaseContext.java
new revision: 1.8; previous revision: 1.7
/cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/JavaScript.nbs
new revision: 1.53; previous revision: 1.52
/cvs/languages/engine/src/org/netbeans/modules/languages/resources/NBS.nbs
new revision: 1.27; previous revision: 1.26
Comment 3 Martin Schovanek 2007-11-07 16:25:08 UTC
Nb 6.0 stopper, increasing priority to P1.
Comment 4 Martin Schovanek 2007-11-08 07:02:42 UTC
Verified in trunk by QE.
Comment 5 Daniel Prusa 2007-11-08 09:09:46 UTC
Commit of TokenHighlightLayer caused a regression in jsp (issue 121423), I have rollback it. It does not have any impact
on the fix of the originaly reported problem with rename refactoring, it should still work correctly (Martine, can you
test it again, please?). The rollback causes that only marking occurences does not work in some cases now. I have filed
a new issue for this, see #121435.

Rollback:
/cvs/languages/engine/src/org/netbeans/modules/languages/features/TokenHighlightsLayer.java
new revision: 1.10; previous revision: 1.9

Code to be reviewed (the fix of searching in usages/definitions/contexts database):
/cvs/languages/engine/src/org/netbeans/modules/languages/features/UsagesASTEvaluator.java
new revision: 1.7; previous revision: 1.6
/cvs/languages/engine/src/org/netbeans/modules/languages/features/DatabaseContext.java
new revision: 1.8; previous revision: 1.7
/cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/JavaScript.nbs
new revision: 1.53; previous revision: 1.52
/cvs/languages/engine/src/org/netbeans/modules/languages/resources/NBS.nbs
new revision: 1.27; previous revision: 1.26
Comment 6 Jan Jancura 2007-11-08 10:42:24 UTC
Looks like this fix is OK.
looks like DatabaseContext.addItem method can be deleted.

Comment 7 Daniel Prusa 2007-11-09 14:41:58 UTC
Fix merged into release60 branch.

/cvs/languages/engine/src/org/netbeans/modules/languages/features/UsagesASTEvaluator.java
new revision: 1.6.2.1; previous revision: 1.6
/cvs/languages/engine/src/org/netbeans/modules/languages/features/DatabaseContext.java
new revision: 1.7.2.1; previous revision: 1.7
/cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/JavaScript.nbs
new revision: 1.52.2.1; previous revision: 1.52
/cvs/languages/engine/src/org/netbeans/modules/languages/resources/NBS.nbs
new revision: 1.26.2.1; previous revision: 1.26
Comment 8 polan 2008-06-18 12:46:34 UTC
Verified.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo