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 106769 - Get/set methods bodies are not updated when attribute name is changed
Summary: Get/set methods bodies are not updated when attribute name is changed
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Viktor Lapitski
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-06-15 10:16 UTC by Alexandr Scherbatiy
Modified: 2007-06-19 12:45 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 Alexandr Scherbatiy 2007-06-15 10:16:57 UTC
build netbeans-hudson-trunk-760-full.zip

Steps to reproduce:
- Create 'A' Class element
- Insert 'private int a' attribute to the element
- Generate code for the element
  get/set methods are created
-----------------------------------------------
public class A {
    [UML Marker]
    private int a;

    [UML Marker]
    public int getA () {
        return a;
    }

    [UML Marker]
    public void setA (int val) {
        this.a = val;
    }
}
-----------------------------------------------

- Go to the 'A' element
- Rename 'int a' attribute to 'b'
- Generate code for the element
  The bodies of the get/set methods were not updated
-----------------------------------------------
public class A {

    [UML Marker]
    private int b;


    [UML Marker]
    public int getB () {
        return a;    // Old return value
    }

    [UML Marker]
    public void setB (int val) {
        this.a = val;   // Old attribute name
    }

}
-----------------------------------------------
Comment 1 Viktor Lapitski 2007-06-18 23:55:20 UTC
now regenBody set by default to "yes" for set/getters  
Comment 2 Alexandr Scherbatiy 2007-06-19 12:45:07 UTC
verified in netbeans-hudson-trunk-923-full.zip