Bug 157853 - Generate equals() and hashCode() dialog could use "Select all" button
Generate equals() and hashCode() dialog could use "Select all" button
Status: NEW
Product: java
Classification: Unclassified
Component: Editor
6.x
Macintosh All
: P3 with 8 votes (vote)
: 7.4
Assigned To: Dusan Balek
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-03 16:36 UTC by flipflop
Modified: 2013-07-26 13:03 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flipflop 2009-02-03 16:36:05 UTC
Assuming you have defined a simple JavaBean with several properties and their respective getters and setters.

- Right click in a Java file and select the "Insert Code..." menu item.
- In the "Generate" popup menu, select "equals() and hashCode()..." menu item.
- The "Generate equals() and hashCode()" dialog opens.

It would be nice if there was a quick way to select all the properties at once as opposed to selecting them one at a time. Especially if your JavaBean has several 
properties you would like to include in these overridden methods. "Generate Getters" and "Generate Setters" dialogs already have the ability to select all the 
properties... perhaps the same solution can be used in the Generate dialog.
Comment 1 Max Sauer 2009-02-25 13:06:53 UTC
Good Idea, targeting 6.7.
Comment 2 hupfdule 2012-10-01 12:10:35 UTC
What about this?
We are now at 7.2 and still no "select all"/"deselect all" button exists there.
Comment 3 Alexander.Sidorenko 2012-10-21 18:59:40 UTC
It is more natural that if class does not have equals() or hashCode() methods then all class properties are selected to be included in these methods by default.
Comment 4 ngx472 2013-02-16 16:40:40 UTC
This needs to be fixed. 
When dealing with pojos containing 50+ fields (it exists, try to work for a bank), how did the inventor of the hashcode/equals generation could expect a human being to click on 100 check boxes?
It simply makes no sense.
I have been a great NB fan since a long time, but please, launch eclipse from time to time and get inspired...
Thanks a lot


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