The search plugin implements the search dialog and the search result view. Client can contribute search dialog pages (extension point 'org.eclipse.search.searchPages') and search result view pages (extension point 'org.eclipse.search.searchResultViewPages') to integrate their searches to the shared search user interface.
Search dialog pages contributing to the 'searchPages' extension point must implement ISearchPage
. A search page
has access to its ISearchPageContainer
to modify search
dialog properties.
A search dialog page can additionally implement IReplacePage
to allow the 'Replace' button to show up.
The search view that shows the search results has been redesigned for 3.0. It is recommended to use and to switch to the new API:
On 'OK', an implementation of a search dialog page creates a search query, represented by an instances of type ISearchQuery
. The query
can be run using API on NewSearchUI
and will create a ISearchResult
as result.
ISearchResultListener
can be added to search results and report changes as SearchResultEvent
.
Clients have to contribute a search result page (ISearchResultPage
) that can
visualize the matches contained in the result set.
The result page has access to the view using ISearchResultViewPart
For compatibility to searches written prior to 3.0, the following APIs still exist and are functional. The old search result view is called 'classic search view' in the UI.
Before 3.0, the search result view was fully implemented by the search plugin. All search results had to be marked with search markers (org.eclipse.core.resources.IMarker
, registered under 'org.eclipse.search.searchmarker')
The search dialog page (type ISearchResultView
) could access the single search result view using SearchUI.getSearchResultView()
. It showed all matches as elements of type ISearchResultViewEntry
.
IGroupByKeyComputer
, IActionGroupFactory
, IContextMenuContributor
and extension point
'org.eclipse.search.searchResultSorters' were used to configure the search result view.