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.
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)
Created attachment 31359 [details] Eclipse screen shot
reassigning to Refactoring
Not implemented in trunk so far.
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
implemented as http://hg.netbeans.org/main/rev/ab2b7b02a475
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