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 231083 - 'Apply Rename On Comments' does not work
Summary: 'Apply Rename On Comments' does not work
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-11 12:49 UTC by ssazonov
Modified: 2013-08-29 11:56 UTC (History)
0 users

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 ssazonov 2013-06-11 12:49:09 UTC
Create simple class:

---------------------------
    class SimpleClass{

        private String stringVal = "";

        /**
         * 
         * @return stringVal
         */
        public String getStringVal() {
            return stringVal;
        }

        /**
         * 
         * @param stringVal 
         */
        public void setStringVal(String stringVal) {
            this.stringVal = stringVal;
        }
        
    }
---------------------------

Rename variable "stringVal" in this steps:

1. Put caret on field stringVal and invoke Refactor | Rename action from the popup menu.

2. Fill a new field name stringValRenamed, check 'Apply Rename On Comments' and 'Apply Rename On Comments' then confirm this dialog. 

3. You'll get this code:

---------------------------
    class MyClass{

        private String stringValRenamed = "";

        /**
         * 
         * @return stringVal
         */
        public String getStringValRenamed() {
            return stringValRenamed;
        }

        /**
         * 
         * @param stringVal 
         */
        public void setStringValRenamed(String stringValRenamed) {
            this.stringValRenamed = stringValRenamed;
        }
        
    }
---------------------------

>> stringVal was not renamed in comments

Product Version: NetBeans IDE Dev (Build 201306102301)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b30
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Ralph Ruijs 2013-06-16 15:10:41 UTC
changeset   : 3fdc074b871c
author      : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date        : Sun Jun 16 16:59:02 CEST 2013
summary     : #231083 - 'Apply Rename On Comments' does not work
Comment 2 Quality Engineering 2013-06-18 14:47:45 UTC
Integrated into 'main-golden', will be available in build *201306181109* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3fdc074b871c
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #231083 - 'Apply Rename On Comments' does not work
Comment 3 ssazonov 2013-08-29 11:56:10 UTC
Verified on

Product Version: NetBeans IDE Dev (Build 201308261123)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)