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 - Hint for generating getter and setter of a field
Summary: Hint for generating getter and setter of a field
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2006-05-22 13:47 UTC by ieising
Modified: 2013-09-02 14:19 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description ieising 2006-05-22 13:47:53 UTC

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.

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.