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 224242

Summary: [73cat] rename property
Product: java Reporter: muellermi <muellermi>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal CC: markiewb
Priority: P3 Keywords: PLAN
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 228870    
Bug Blocks:    
Attachments: IDE log

Description muellermi 2012-12-26 21:41:59 UTC
Product Version = NetBeans IDE Dev (Build 201212220001)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_10
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04

Let's have an attribute like
    private String _info;

Next, call refactor, encapsulate field. NetBeans will generate

    public String getInfo() {
        return _info;
    }

    public void setInfo(String info) {
        this._info = info;
    }

Now, try to rename _info, let's say to _information. NB will rename this attribute only.
I suggest to 
- rename the attribute
- rename getter and setter
- rename setter's parameter

If you try to rename getInfo, NB will rename this and all it's occurencies in Java sources

I suggest to
- rename getter (existing)
- rename corresponding setter
- rename all occurrencies of getter and setter
- rename all coprresponding properties of EL expressions in JSF/JSP pages
Comment 1 muellermi 2012-12-26 21:42:53 UTC
Created attachment 129703 [details]
IDE log
Comment 3 Ralph Ruijs 2013-04-30 21:54:25 UTC
Fixed in jet-main by 80f139ccdada
Comment 4 Quality Engineering 2013-05-02 14:14:03 UTC
Integrated into 'main-golden', will be available in build *201305021042* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/80f139ccdada
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #228870 - New API to support CodeStyle's prefix/suffix
#65315 #81243 #224242 - Use CodeStyle's prefix and suffix configuration