Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 192106 - [70cat] Generate Getters and Setters should respect properties order
[70cat] Generate Getters and Setters should respect properties order
Status: RESOLVED WORKSFORME
Product: java
Classification: Unclassified
Component: Editor
7.0
PC Linux
: P3 (vote)
: TBD
Assigned To: Dusan Balek
issues@java
: NETFIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-18 13:32 UTC by Michel Graciano
Modified: 2012-03-28 16:21 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Simple patch (872 bytes, patch)
2010-11-22 17:35 UTC, Michel Graciano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2010-11-18 13:32:29 UTC
[ BUILD # : d5b5aa729233 ]
[ JDK VERSION : 1.6.20 ]

The hint to generate getters and setters should create the methods in the same
order as fields are declared.
Comment 1 Michel Graciano 2010-11-18 13:39:32 UTC
It looks to me a really good candidate for NetFIX[1] program. Any objection from you in review a future patch?

[1] http://wiki.netbeans.org/NetFIX
Comment 2 Michel Graciano 2010-11-22 17:35:47 UTC
Created attachment 103198 [details]
Simple patch

I've made a little change which make it works as expected when generating the code but now it affects the UI too. The fields are shown now in the same order they are declared and will have their methods created. It will reflects as well for toString generation.
Comment 3 Jiri Kovalsky 2010-11-22 19:29:30 UTC
Dusane, can you please review & integrate the patch if you think it's okay? Thanks!
Comment 4 Dusan Balek 2010-11-23 10:06:40 UTC
I don't think the patch is OK - elements (methods, fields) should stay sorted alphabetically in the UI IMHO (otherwise, e.g. finding a proper method to override from the JTextComponent becomes quite difficult).
Comment 5 Michel Graciano 2010-11-23 15:36:23 UTC
Comment on attachment 103198 [details]
Simple patch

No problem. I will work more on it soon. Thanks.
Comment 6 Michel Graciano 2012-03-28 16:21:46 UTC
Looks like the latest redesign of code generation has fixed it. Thanks guys.

v. Build 20120328-c92916a691a0


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