This document lists changes made to the Search in Projects API.
Fuller descriptions of all changes can be found below (follow links).
Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.
These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:
OpenIDE-Module-Module-Dependencies: org.netbeans.api.search/1 > 1.20
ScopeOptionsController; made by: jhavlin; issues: #226286
Controls for specifying search scope options can now be split into two panels - one for scope options, and one for file name options.
Class ComponentUtils has new method adjustPanelsForOptions(JPanel, JPanel, boolean, FileNameController), that takes the two panels. It can be used instead of adjustPanelForOptions(JPanel, boolean, FileNameController), that puts all controls into a single panel.
Class ScopeOptionsController has new method getFileNameComponent() to get the panel with controls related to file name. (The panel related to search scope can be get using getComponent()).
SearchPatternController; made by: jhavlin; issues: #224328
Before, the search pattern distinguished two match types: Regular Expression and Standard. The standard meant that the text was searched literally in editor search, and that the searched text could contain basic wildcards (* and ?) in Find in Projects.
Now, the Search pattern can specify exact match type: Regular Expression, Basic Wildcards and Literal. Basic wildcards are not supported by Editor search, but the fallback to Literal Search is transparent for the editor.
To support extra match types, a few parts have to be added to the API:
SearchScopeDefinition; made by: jhavlin; issues: #222406
Search scope can define an icon that will be shown in the UI, usually in the combo box for search scope selection.
To use a custom scope icon, override method SearchScopeDefinition.getIcon().
SearchHistory; made by: mkristofic
Search History is extended for replace history.
New ReplacePattern is a wrap class for replace expression.
SearchResultsDisplayer; made by: jhavlin
called when the results panel is closed by the user. It can
be overriden to release all resouces held by the panel.
Before this change,
used to detect detaching of search results panels. But it
is quite complicated as the panels can be often detached and
attached again when they are moved from a simple pane to a
tabbed pane or vice versa.
SearchInfoDefinition; made by: jhavlin
Previous versions of this API supported searching based on
FileObjects only. In some cases
(e.g. remote filesystems), working with
FileObjects is too expensive and slow.
This API change make it possible to work with
URI objects as an alternative to
ComponentUtils; made by: jhavlin
SearchPatternController, that complements
other controllers for search-related UI components.
DefaultSearchResultsDisplayer; made by: jhavlin
returns object of type
that can be customized, and that let users reuse some features
used in the standard search provider.
Built on August 13 2020. | Copyright © 2017-2020 Apache Software Foundation. All Rights Reserved.