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 76683

Summary: Hint for generating getter and setter of a field
Product: java Reporter: ieising <ieising>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker CC: markiewb
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description ieising 2006-05-22 13:47:53 UTC
Hi,

I would really like to see a bulb show up when I generate a field, that suggests
to generate the getter and setter for the field.
In addition, I think it could be usefull to have an option to generate the
object or the primitive setter for a primitive or object type.

For example:

    private Long myLong;

would result in a bulb suggesting to generate:

    public Long getMyLong() {return myLong;}
    public void setMyLong(Long value) {myLong = value;)

as well as to generate the setter:

    public void setMyLong(long value) {myLong = new Long(value);}

with the field "long myLong" it would be the other way around.

Iwan
Comment 1 Dusan Balek 2006-10-26 15:10:29 UTC
Reassigning to Honza.
Comment 2 Jan Lahoda 2006-12-12 09:25:35 UTC
I agree that this would be useful, but I do not think this is a defect. Thanks
for the suggestion.