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 79042 - [Encapsulate fields] insert point, sort by and better checkbox defaults needed
Summary: [Encapsulate fields] insert point, sort by and better checkbox defaults needed
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-25 04:52 UTC by cayhorstmann
Modified: 2008-06-02 12:57 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Eclipse screen shot (31.79 KB, image/png)
2006-06-25 04:53 UTC, cayhorstmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cayhorstmann 2006-06-25 04:52:09 UTC
1) When you select Refactoring -> Encapsulate Fields, only the checkboxes of
getters and setters that do not currently exist should ever be checked. 
2) There should be a way to selectively check and uncheck those getters and
setters. Eclipse has the following four options: "Select All", "Select None",
"Select Getters", "Select Setters".

Eclipse also has handy options "insertion point", "sort by", and "generate
method comments" that should be added. (Two of these were requested in
http://www.netbeans.org/issues/show_bug.cgi?id=73477 and
http://www.netbeans.org/issues/show_bug.cgi?id=55998)
Comment 1 cayhorstmann 2006-06-25 04:53:22 UTC
Created attachment 31359 [details]
Eclipse screen shot
Comment 2 Jiri Prox 2006-06-26 11:10:38 UTC
reassigning to Refactoring
Comment 3 Jan Becicka 2006-11-22 12:35:05 UTC
Not implemented in trunk so far.
Comment 4 Jan Pokorsky 2008-04-17 15:59:20 UTC
You mix two things together the Encapsulate Field refactoring and the Insert Getter and Setter. They are similar but not
same (even in Eclipse). Following comments relate to the Encapsulate Field refactoring.

ad 1) I have added notification of existing methods to make it clear. They appear with icons and tool tip now.
http://hg.netbeans.org/main/rev/d51d89040dd6
Maybe it would be enough to have one checkbox per field.

ad 2) "Select All" and "Select None" make sense

ad "insertion point") makes sense

ad "sort by") strange option, it seems to be counter to "insertion point"

ad "generate method comments") makes sense
Comment 5 Jan Pokorsky 2008-04-28 18:19:17 UTC
implemented as http://hg.netbeans.org/main/rev/ab2b7b02a475
Comment 6 Quality Engineering 2008-04-29 04:18:59 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #164 build
Changeset: http://hg.netbeans.org/main/rev/ab2b7b02a475
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #79042: Encapsulate Fields enhancements
  * select buttons #118849
  * insert point
  * sort by
  * comments #48296, #73477
  * setters for final fields
  * new layout