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 160037 - Refactor.rename misses many instances
Summary: Refactor.rename misses many instances
Status: CLOSED WONTFIX
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-10 19:10 UTC by saluk
Modified: 2017-06-23 08:05 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 saluk 2009-03-10 19:10:29 UTC
The rename feature is not finding many instances that should be renamed, which it should be able to find fairly easily.
 False positives are one thing, because you can scroll through the occurances and say, well, I don't want to renamed
this one, etc.  However, missed instances will cause errors and crashes, some of which are not easily discoverable by a
human.

Here are the things I have seen that it doesn't find but should:

-module stuff-

class capitalizeme:
    def copy(self):
        return capitalizeme()

-module other1-
import stuff

stuff.capitalizeme(args)

-module other2-
from stuff import capitalizeme

capitalizeme(args)

----------------
A rename of capitalizeme to Capitalizeme, will not rename any of the occurances of the class, except for the bare usage
of the class in the first module.  The solution I have been following is to do renames in 3 steps, the netbeans rename,
a find and replace of stuff.capitalizeme to stuff.Capitalizeme, and a find and replace of "from stuff import
capitalizeme" to "from stuff import Capitalizeme".  If catching this occurances is too much work, or until they do,
perhaps a warning can be printed for the rename to do those find and replace as well.
Comment 1 Jenselme 2017-06-22 21:45:46 UTC
Refactoring will need work. We are planning to do this. This will be tracked elsewhere. Closing this old bug.
Comment 2 Jiri Kovalsky 2017-06-23 08:05:24 UTC
Thanks for your evaluation Julien. Reporter, if you think your issue is still valid and needs to be addressed, don't hesitate to reopen it with additional information. Closing for now.