Schnittstelle IJavaSearchResultCollector
public interface IJavaSearchResultCollector
Veraltet.
A
IJavaSearchResultCollector collects search results from a search
query to a SearchEngine. Clients must implement this interface and pass
an instance to the search(...) methods. When a search starts, the aboutToStart()
method is called, then 0 or more call to accept(...) are done, finally the
done() method is called.
Results provided to this collector may be accurate - in this case they have an EXACT_MATCH accuracy -
or they might be potential matches only - they have a POTENTIAL_MATCH accuracy. This last
case can occur when a problem prevented the SearchEngine from resolving the match.
The order of the results is unspecified. Clients must not rely on this order to display results, but they should sort these results (for example, in syntactical order).
The IJavaSearchResultCollector is also used to provide a progress monitor to the
SearchEngine.
Clients may implement this interface.
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intVeraltet.UseSearchMatch.A_ACCURATEinstead.static final intVeraltet.UseSearchMatch.A_INACCURATEinstead. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidVeraltet.Replaced bySearchRequestor.beginReporting().voidaccept(org.eclipse.core.resources.IResource resource, int start, int end, IJavaElement enclosingElement, int accuracy) Veraltet.Replaced bySearchRequestor.acceptSearchMatch(SearchMatch).voiddone()Veraltet.Replaced bySearchRequestor.endReporting().org.eclipse.core.runtime.IProgressMonitorVeraltet.Returns the progress monitor used to report progress.
-
Felddetails
-
EXACT_MATCH
static final int EXACT_MATCHVeraltet.UseSearchMatch.A_ACCURATEinstead.The search result corresponds exactly to the search pattern.- Siehe auch:
-
POTENTIAL_MATCH
static final int POTENTIAL_MATCHVeraltet.UseSearchMatch.A_INACCURATEinstead.The search result is potentially a match for the search pattern, but a problem prevented the search engine from being more accurate (typically because of the classpath was not correctly set).- Siehe auch:
-
-
Methodendetails
-
aboutToStart
void aboutToStart()Veraltet.Replaced bySearchRequestor.beginReporting().Called before the actual search starts. -
accept
void accept(org.eclipse.core.resources.IResource resource, int start, int end, IJavaElement enclosingElement, int accuracy) throws org.eclipse.core.runtime.CoreException Veraltet.Replaced bySearchRequestor.acceptSearchMatch(SearchMatch).Accepts the given search result.- Parameter:
resource- the resource in which the match has been foundstart- the start position of the match, -1 if it is unknownend- the end position of the match, -1 if it is unknown; the ending offset is exclusive, meaning that the actual range of characters covered is[start, end]enclosingElement- the Java element that contains the character range[start, end]; the value can benullindicating that no enclosing Java element has been foundaccuracy- the level of accuracy the search result has; eitherEXACT_MATCHorPOTENTIAL_MATCH- Löst aus:
org.eclipse.core.runtime.CoreException- if this collector had a problem accepting the search result
-
done
void done()Veraltet.Replaced bySearchRequestor.endReporting().Called when the search has ended. -
getProgressMonitor
org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()Veraltet.Returns the progress monitor used to report progress.- Gibt zurück:
- a progress monitor or null if no progress monitor is provided
-
SearchRequestorreplaces this interface.