|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.search.ui.text.AbstractTextSearchResult
public abstract class AbstractTextSearchResult
An abstract base implementation for text-match based search results. This search
result implementation consists of a list of matches.
No assumptions are made about the kind of elements these matches are reported against.
| Constructor Summary | |
|---|---|
protected |
AbstractTextSearchResult()
Constructs a new AbstractTextSearchResult |
| Method Summary | |
|---|---|
void |
addListener(ISearchResultListener l)
Adds a ISearchResultListener. |
void |
addMatch(Match match)
Adds a Match to this search result. |
void |
addMatches(Match[] matches)
Adds a number of Matches to this search result. |
protected void |
fireChange(SearchResultEvent e)
Send the given SearchResultEvent to all registered search
result listeners. |
MatchFilter[] |
getActiveMatchFilters()
Returns the active match filters for this result. |
MatchFilter[] |
getAllMatchFilters()
Returns all applicable filters for this result or null if match filters are not supported. |
abstract IEditorMatchAdapter |
getEditorMatchAdapter()
Returns an implementation of IEditorMatchAdapter appropriate
for this search result. |
Object[] |
getElements()
Returns an array containing the set of all elements that matches are reported against in this search result. |
abstract IFileMatchAdapter |
getFileMatchAdapter()
Returns an implementation of IFileMatchAdapter appropriate
for this search result. |
int |
getMatchCount()
Returns the total number of matches contained in this search result. |
int |
getMatchCount(Object element)
Returns the number of matches reported against a given element. |
Match[] |
getMatches(Object element)
Returns an array with all matches reported against the given element. |
void |
removeAll()
Removes all matches from this search result. |
void |
removeListener(ISearchResultListener l)
Removes a ISearchResultChangedListener. |
void |
removeMatch(Match match)
Removes the given match from this search result. |
void |
removeMatches(Match[] matches)
Removes the given matches from this search result. |
void |
setActiveMatchFilters(MatchFilter[] filters)
Sets the active match filters for this result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.search.ui.ISearchResult |
|---|
getImageDescriptor, getLabel, getQuery, getTooltip |
| Constructor Detail |
|---|
protected AbstractTextSearchResult()
AbstractTextSearchResult
| Method Detail |
|---|
public Match[] getMatches(Object element)
element - the element to report matches for
Match.getElement()public void addMatch(Match match)
Match to this search result. This method does nothing if the
match is already present.
Subclasses may extend this method.
match - the match to addpublic void addMatches(Match[] matches)
Subclasses may extend this method.
matches - the matches to addpublic void removeAll()
Subclasses may extend this method.
public void removeMatch(Match match)
Subclasses may extend this method.
match - the match to removepublic void removeMatches(Match[] matches)
Subclasses may extend this method.
matches - the matches to removepublic void addListener(ISearchResultListener l)
ISearchResultListener. Has no effect when the
listener has already been added.
addListener in interface ISearchResultl - the listener to be addedpublic void removeListener(ISearchResultListener l)
ISearchResultChangedListener. Has no effect
when the listener hasn't previously been added.
removeListener in interface ISearchResultl - the listener to be removedprotected void fireChange(SearchResultEvent e)
SearchResultEvent to all registered search
result listeners.
e - the event to be sentISearchResultListenerpublic int getMatchCount()
public int getMatchCount(Object element)
getMatches(element).length
The filter state of the matches is not relevant when counting matches. All matches are counted.
element - the element to get the match count for
public Object[] getElements()
public void setActiveMatchFilters(MatchFilter[] filters)
Match.isFiltered() of matches and the AbstractTextSearchViewPage will only
show non-filtered matches. If null is set
the filter state of the match is ignored by the AbstractTextSearchViewPage and all matches
are shown.
Note the model contains all matches, regardless if the filter state of a match.
filters - the match filters to set or null if the filter state of the match
should be ignored.public MatchFilter[] getActiveMatchFilters()
Match.isFiltered() of matches and the AbstractTextSearchViewPage will only
show non-filtered matches. If null is set
the filter state of the match is ignored by the AbstractTextSearchViewPage and all matches
are shown.
null if the filter state of the match
should be ignored.public MatchFilter[] getAllMatchFilters()
AbstractTextSearchViewPage will contain menu entries in the view menu.
public abstract IEditorMatchAdapter getEditorMatchAdapter()
IEditorMatchAdapter appropriate
for this search result.
null if none has been implementedIEditorMatchAdapterpublic abstract IFileMatchAdapter getFileMatchAdapter()
IFileMatchAdapter appropriate
for this search result.
null if none has been implementedIFileMatchAdapter
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.