Introduction

This document lists changes made to the Search in Projects API.


Index of APIs

Incompatible changes by date

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.

All changes by date

Changes by version

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

Changes by affected class

org.netbeans.api.search.ui.ComponentUtils

org.netbeans.spi.search.provider.DefaultSearchResultsDisplayer

org.netbeans.api.search.provider.FileNameMatcher

org.netbeans.api.search.ReplacePattern

org.netbeans.api.search.ui.ScopeOptionsController

org.netbeans.api.search.provider.SearchFilter

org.netbeans.spi.search.SearchFilterDefinition

org.netbeans.api.search.SearchHistory

org.netbeans.api.search.provider.SearchInfo

org.netbeans.spi.search.SearchInfoDefinition

org.netbeans.api.search.provider.SearchListener

org.netbeans.api.search.SearchPattern

org.netbeans.api.search.ui.SearchPatternController

org.netbeans.spi.search.provider.SearchResultsDisplayer

org.netbeans.api.search.SearchRoot

org.netbeans.spi.search.SearchScopeDefinition


Details of all changes by API and date


Search in Projects API

Added method ComponentUtils.adjustPanelsForOptions

Feb 6 '13; API spec. version: 1.12; affected top-level classes: ComponentUtils 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()).

Search pattern supports three match types (literal, basic wildcards, regexp)

Jan 29 '13; API spec. version: 1.11; affected top-level classes: SearchPattern 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:

Added method getIcon to class SearchScopeDefinition

Jan 29 '13; API spec. version: 1.10; affected top-level classes: 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().

Added ReplacePattern and replace history to SearchHistory class

Nov 20 '12; API spec. version: 1.1.8; affected top-level classes: ReplacePattern SearchHistory; made by: mkristofic

Search History is extended for replace history.

New ReplacePattern is a wrap class for replace expression.

Added method SearchResultsDisplayer.closed()

Jun 25 '12; API spec. version: 1.1.5; affected top-level classes: SearchResultsDisplayer; made by: jhavlin

The new SearchResultsDisplayer.closed() is 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, HierarchyListeners were 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.

Support for URI-based searching

Apr 27 '12; API spec. version: 1.1.4; affected top-level classes: SearchRoot FileNameMatcher SearchFilter SearchInfo SearchListener SearchFilterDefinition SearchInfoDefinition; made by: jhavlin

Previous versions of this API supported searching based on traversing of 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 FileObjects.

Added class SearchPatternController

Apr 20 '12; API spec. version: 1.1; affected top-level classes: SearchPatternController ComponentUtils; made by: jhavlin

Added method ComponentUtils.adjustComboForSearchPattern and class SearchPatternController, that complements other controllers for search-related UI components.

Added class DefaultSearchResultsDisplayer

Apr 20 '12; API spec. version: 1.1; affected top-level classes: DefaultSearchResultsDisplayer; made by: jhavlin

Method SearchResultsDisplayer.createDefault now returns object of type DefaultSearchResultsDisplayer that can be customized, and that let users reuse some features used in the standard search provider.


Built on October 11 2013.  |  Portions Copyright 1997-2013 Oracle. All rights reserved.