public class UpdateSearchRequest extends Object
Classes that implement IUpdateSearchResultCollector should call 'accept' to test if the match should be accepted according to the filters added to the request.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
UpdateSearchScope
,
IUpdateSearchCategory
Constructor and Description |
---|
UpdateSearchRequest(IUpdateSearchCategory category,
UpdateSearchScope scope)
The constructor that accepts the search category and
scope objects.
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(IUpdateSearchFilter filter)
Adds a filter to this request.
|
static IUpdateSearchCategory |
createDefaultSiteSearchCategory()
Returns a site search category for use in discovering new function on update sites.
|
static IUpdateSearchCategory |
createDefaultUpdatesSearchCategory()
Returns an updates search category for use in discovering updates
to existing function on update sites.
|
IUpdateSearchCategory |
getCategory()
Returns the search catagory used in this request.
|
UpdateSearchScope |
getScope()
Returns the scope of this search request.
|
boolean |
isSearchInProgress()
Tests whether this search request is current running.
|
void |
performSearch(IUpdateSearchResultCollector collector,
IProgressMonitor monitor)
Runs the search using the category and scope configured into
this request.
|
void |
removeFilter(IUpdateSearchFilter filter)
Removes the filter from this request.
|
void |
setScope(UpdateSearchScope scope)
Sets the scope object.
|
public UpdateSearchRequest(IUpdateSearchCategory category, UpdateSearchScope scope)
category
- the actual search pattern that should be appliedscope
- a list of sites that need to be scanned during the searchpublic static IUpdateSearchCategory createDefaultUpdatesSearchCategory()
public static IUpdateSearchCategory createDefaultSiteSearchCategory()
public IUpdateSearchCategory getCategory()
public UpdateSearchScope getScope()
public void addFilter(IUpdateSearchFilter filter)
filter
- the filterremoveFilter(org.eclipse.update.search.IUpdateSearchFilter)
public void removeFilter(IUpdateSearchFilter filter)
filter
- the filter to removeaddFilter(org.eclipse.update.search.IUpdateSearchFilter)
public void setScope(UpdateSearchScope scope)
scope
- the new search scopepublic boolean isSearchInProgress()
public void performSearch(IUpdateSearchResultCollector collector, IProgressMonitor monitor) throws CoreException, OperationCanceledException
collector
- matched features are passed to this objectmonitor
- used to track the search progressCoreException
OperationCanceledException
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.