Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 201601

Summary: Getters/Setters should be generated in order of underlying fields
Product: java Reporter: Geertjan Wielenga <geertjan>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 Keywords: PLAN
Version: 7.0.1   
Target Milestone: 7.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

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. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo