Bug 201601 - Getters/Setters should be generated in order of underlying fields
Getters/Setters should be generated in order of underlying fields
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Editor
7.0.1
PC Linux
: P3 (vote)
: 7.2
Assigned To: Dusan Balek
issues@java
: PLAN
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-04 14:29 UTC by Geertjan Wielenga
Modified: 2012-03-13 13:46 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2011-09-04 14:29:53 UTC
I have fields defined like this:

private String type;
private int age;
private String city;

So, when the getters/setters are generated, they should be generated in the order above, instead of alphabetically.

Or, there should be an option in the Options window for setting the order in which getters/setters should be generated -- either alphabetically or as defined by the field order.
Comment 1 rdelaplante 2011-09-04 18:05:15 UTC
I think the generate getter/setter window that shows checkboxes beside fields should also have a way for me to change the order (up/down arrows).  It should default to the order the fields were defined, but could also have a way to sort alphabetically?  It could also let you choose if you want to group your getters/setters or not.   The eclipse dialog for generating getters/setters has a lot more functionality than the NetBeans one.
Comment 2 Jan Becicka 2011-10-06 07:32:01 UTC
This is about generate getter and setter in editor
Comment 3 Dusan Balek 2011-10-07 10:56:07 UTC
Since NB7.1 is already feature frozen, marking as an enhancement for the next release.
Comment 4 Quality Engineering 2012-02-22 11:01:59 UTC
Integrated into 'main-golden', will be available in build *201202220400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/59f4db16d3e7
User: Dusan Balek <dbalek@netbeans.org>
Log: Issues #200938, #201601: Customizable order of generated class members - fixed.
Comment 5 Dusan Balek 2012-03-13 13:46:56 UTC
Fixed together with #200938


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo