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 79257 - alowing refactoring to work on (string) data, as well as code
Summary: alowing refactoring to work on (string) data, as well as code
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Jan Becicka
: 212160 (view as bug list)
Depends on:
Reported: 2006-06-27 21:50 UTC by hefest
Modified: 2016-07-07 07:30 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description hefest 2006-06-27 21:50:46 UTC
From my message ("refactoring so constrained it becomes useless") on

4.) string manipulation should be improved: if I have a class
mytestpackage.MyClass which I want to rename to
com.mycompany.myproduct.some.package.SensibleClassName, the
refactoring algorithm should e.g. notice that there are strings in the
file like "mytestpackage.MyClass" (in, say, a Class.forName()
statement) and transform it into
5.) the same goes for moving/renaming packages: the refactoring
algorithm should detect  strings in the file like
"mytestpackage/an_image.jpg" and transform it into

Some of these are probably implemented and only the first two ideas
are an exact science (the rest can't be guaranteed to be correct
without intelligent supervision on a case by case base), but
refactoring - through no fault of it's own - is basically severely

Basically, I suggest dividing changes into "certainly necessary" and something
like "probably should be done, but it's your call". The above examples fall into
the second category.
Jesse Glick had the following idea:
"The simplest approach is to assume that any string constant matching the name
should be changed; this should get most or all references but may change
something it shouldn't."
I believe that 90+% of refactoring suggestions made this way would be good so
it's a good idea, as long as the user can pick and choose the changes he/she
wants done.
There's room for improovement in the before/after comparison frame as well: in
this respect, using the eclipse code comparison dialog might not be a bad idea.
Comment 1 Ralph Ruijs 2012-05-09 09:22:59 UTC
*** Bug 212160 has been marked as a duplicate of this bug. ***
Comment 2 Martin Balin 2016-07-07 07:30:00 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss