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.
Created attachment 118366 [details] Patch Module api.search provides a very simple default component for displaying search results. Some clients, e.g. module cnd.search, need to reuse some advanced features used in the standard search results panel. The attached patch changes result type of SearchResultsDisplayer.createDefault to new type DefaultSearchResultsDisplayer, that is enhanced (buttons to navigate in results) and that enables clients to customize the outline view used to display nodes, e.g. to add property columns. There is also new support for creating combo box for search text pattern, method ComponentUtils.adjustComboForSearchPattern and class SearchPatternController. The patch was co-authored and revised by Andrew Krasny from CND team.
Please review.
No objections.. Means it passed.. (?)
[AS01] Final keywords are redundant in the method SearchResultsDisplayer.createDefault() [AS02] SearchPatternController opens internal methods: getOption(), getText(), requestFocusInWindow(), setOption(), setSearchPattern() and setText(). Probably methods should be hidden.
[JB01] all API classes should be final if possible (for instance SearchPatternController should be final, right?) [JB02] document change in api-changes.xml [JB03] Use @since tag properly for all new stuff [JB04] Do not forget to increase spec version of the module
Created attachment 118574 [details] Patch
AS01 - Redundant "final" keywords removed. AS02 - Methods made private, except for "requestFocusInWindow". I think it is quite useful. Do not you think so? JB01 - Class SearchPatternController made final. JB02 - File apichanges.xml created. JB03 - Tags @since added. JB04 - Specification version increased. Thank you for your comments.
Regarding requestFocusInWindow... Strictly, this is not Controller's method... requestFocusInWindow method is supposed to be a method of some Component... And also for user of this API it is not big difference either invoke this controller.requestFocusInWindow or his combobox.requestFocusInWindow.
Created attachment 118617 [details] Patch (In reply to comment #7) > Regarding requestFocusInWindow... Strictly, this is not Controller's method... > requestFocusInWindow method is supposed to be a method of some Component... > And also for user of this API it is not big difference either invoke this > controller.requestFocusInWindow or his combobox.requestFocusInWindow. Sure, sorry, my mistake. Fixed.
If there are no objections, I'll integrate tomorrow. Thanks.
Integrated as http://hg.netbeans.org/core-main/rev/d55e9c11ecfd
Integrated into 'main-golden', will be available in build *201204260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d55e9c11ecfd User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #211287 - Make default search results displayer customizable
Integrated into 'main-golden', will be available in build *201204270400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/83016f739006 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #211287 - Fixed apichanges.xml, missing @since annotation