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 88220 - "Apply rename on comments" checkbox has no effect
Summary: "Apply rename on comments" checkbox has no effect
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 60674 90411 94995 95435 111242 111967 (view as bug list)
Depends on: 91915
Blocks:
  Show dependency tree
 
Reported: 2006-10-30 11:53 UTC by Max Sauer
Modified: 2007-11-05 09:01 UTC (History)
3 users (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 Max Sauer 2006-10-30 11:53:31 UTC
When refactor|renaming, the "Apply rename on comments" checkbox does not affect
anything.

Steps to reproduce:
-------------------
1) Create a new java class
2) Place carret in its declaration
3) Invoke Refactor|Rename, check "Apply rename on comments" checkbox
=> Comments were not affected by rename

---
NetBeans IDE Dev (Build 061030)
1.6.0-rc; Java HotSpot(TM) Server VM 1.6.0-rc-b103
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 1 Jan Becicka 2006-12-01 11:40:12 UTC
*** Issue 90411 has been marked as a duplicate of this issue. ***
Comment 2 Jiri Prox 2006-12-01 12:14:47 UTC
*** Issue 90411 has been marked as a duplicate of this issue. ***
Comment 3 Jan Pokorsky 2007-02-13 17:00:37 UTC
*** Issue 95435 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2007-04-12 17:41:17 UTC
Cannot be fixed before issue 91915.
Comment 5 Jan Becicka 2007-04-18 19:27:07 UTC
*** Issue 94995 has been marked as a duplicate of this issue. ***
Comment 6 Torbjorn Norbye 2007-06-11 17:40:25 UTC
If I'm renaming something and I want to update files, search/replace in comments is useful, but 
wouldn't it be better to be more general and let me update all other references, such as references in 
XML files, .properties files and such?

In other words, instead of

[x] Apply rename on comments

wouldn't it be better to have

[x] Apply rename to all file types (plain text replacement)
Comment 7 Jan Becicka 2007-06-13 10:44:39 UTC
> If I'm renaming something and I want to update files, search/replace in comments is useful, but 
> wouldn't it be better to be more general and let me update all other references, such as references in 
> XML files, .properties files and such?

Of course, but it is different feature. You still can have comments in XML files.
Comment 8 Torbjorn Norbye 2007-06-13 15:14:37 UTC
Yes, I'm just arguing that this other feature (searching for references in all files) is more important than one limited to comments.  A comment search is going 
to be a raw text search/replace, and that ought to be available for all files. Even in an XML file, I wouldn't want it limited to comments. If you take a look at a 
typical NetBeans layer XML file for example, it can have class name references as element attribute values.
Comment 9 Jiri Prox 2007-07-30 10:37:58 UTC
*** Issue 111242 has been marked as a duplicate of this issue. ***
Comment 10 Jiri Prox 2007-07-30 10:44:34 UTC
*** Issue 60674 has been marked as a duplicate of this issue. ***
Comment 11 Jiri Prox 2007-08-06 12:36:17 UTC
*** Issue 111967 has been marked as a duplicate of this issue. ***
Comment 12 Jan Becicka 2007-10-05 12:20:04 UTC
Fixed with 91915
Comment 13 Jan Becicka 2007-10-05 12:23:20 UTC
Oops. Not fixed. Yet. Refactoring part missing. Will fix.
Comment 14 Jan Lahoda 2007-10-05 12:29:10 UTC
The checkbox should work now:
Checking in nbproject/project.xml;
/cvs/refactoring/java/nbproject/project.xml,v  <--  project.xml
new revision: 1.13; previous revision: 1.12
done
Checking in src/org/netbeans/modules/refactoring/java/plugins/RenameTransformer.java;
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/RenameTransformer.java,v  <-- 
RenameTransformer.java
new revision: 1.14; previous revision: 1.13
done
Checking in src/org/netbeans/modules/refactoring/java/plugins/RenameRefactoringPlugin.java;
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/RenameRefactoringPlugin.java,v  <-- 
RenameRefactoringPlugin.java
new revision: 1.33; previous revision: 1.32
done
Comment 15 Max Sauer 2007-11-05 09:01:10 UTC
Verified.
---
Product Version: NetBeans IDE Dev (Build 20071105063257)
Java: 1.5.0_14; Java HotSpot(TM) Client VM 1.5.0_14-b03
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/maxa/.netbeans/dev