Package com._1c.g5.v8.dt.search.ui
Class OptimizedTextSearchResult
- java.lang.Object
-
- org.eclipse.search.ui.text.AbstractTextSearchResult
-
- com._1c.g5.v8.dt.search.ui.OptimizedTextSearchResult
-
- All Implemented Interfaces:
org.eclipse.search.ui.ISearchResult
public abstract class OptimizedTextSearchResult extends org.eclipse.search.ui.text.AbstractTextSearchResult implements org.eclipse.search.ui.ISearchResult
Special wrapper forAbstractTextSearchResult
. In this class containing collections of the matches were changed fromList
toHashSet
for acceleration. Also added special methods for getting matches by key object asCollection
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OptimizedTextSearchResult()
Constructs a newCustomtTextSearchResult
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(org.eclipse.search.ui.ISearchResultListener l)
void
addMatch(org.eclipse.search.ui.text.Match match)
void
addMatches(Collection<org.eclipse.search.ui.text.Match> matches)
void
addMatches(org.eclipse.search.ui.text.Match[] matches)
protected void
fireChange(org.eclipse.search.ui.SearchResultEvent e)
org.eclipse.search.ui.text.MatchFilter[]
getActiveMatchFilters()
org.eclipse.search.ui.text.MatchFilter[]
getAllMatchFilters()
protected Collection<org.eclipse.search.ui.text.Match>
getCollectionMatches(Object element)
Analog for methodgetMatches(Object)
returningCollection
of theMatch
es corresponding to theelement
Object[]
getElements()
int
getMatchCount()
int
getMatchCount(Object element)
org.eclipse.search.ui.text.Match[]
getMatches(Object element)
void
removeAll()
void
removeListener(org.eclipse.search.ui.ISearchResultListener l)
void
removeMatch(org.eclipse.search.ui.text.Match match)
void
removeMatches(Collection<org.eclipse.search.ui.text.Match> matches)
void
removeMatches(org.eclipse.search.ui.text.Match[] matches)
void
setActiveMatchFilters(Collection<org.eclipse.search.ui.text.MatchFilter> filters)
Analog for methodsetActiveMatchFilters(MatchFilter[])
working with collectionsvoid
setActiveMatchFilters(org.eclipse.search.ui.text.MatchFilter[] filters)
-
Methods inherited from class org.eclipse.search.ui.text.AbstractTextSearchResult
getEditorMatchAdapter, getFileMatchAdapter, getMatchSet
-
-
-
-
Method Detail
-
getMatches
public org.eclipse.search.ui.text.Match[] getMatches(Object element)
- Overrides:
getMatches
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
addMatch
public void addMatch(org.eclipse.search.ui.text.Match match)
- Overrides:
addMatch
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
addMatches
public void addMatches(Collection<org.eclipse.search.ui.text.Match> matches)
- Parameters:
matches
- the matches to add, cannot benull
-
removeAll
public void removeAll()
- Overrides:
removeAll
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
removeMatch
public void removeMatch(org.eclipse.search.ui.text.Match match)
- Overrides:
removeMatch
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
addMatches
public void addMatches(org.eclipse.search.ui.text.Match[] matches)
- Overrides:
addMatches
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
removeMatches
public void removeMatches(org.eclipse.search.ui.text.Match[] matches)
- Overrides:
removeMatches
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
removeMatches
public void removeMatches(Collection<org.eclipse.search.ui.text.Match> matches)
- Parameters:
matches
- the matches to remove, cannot benull
-
addListener
public void addListener(org.eclipse.search.ui.ISearchResultListener l)
- Specified by:
addListener
in interfaceorg.eclipse.search.ui.ISearchResult
- Overrides:
addListener
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
removeListener
public void removeListener(org.eclipse.search.ui.ISearchResultListener l)
- Specified by:
removeListener
in interfaceorg.eclipse.search.ui.ISearchResult
- Overrides:
removeListener
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getActiveMatchFilters
public org.eclipse.search.ui.text.MatchFilter[] getActiveMatchFilters()
- Overrides:
getActiveMatchFilters
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getMatchCount
public int getMatchCount()
- Overrides:
getMatchCount
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getMatchCount
public int getMatchCount(Object element)
- Overrides:
getMatchCount
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getElements
public Object[] getElements()
- Overrides:
getElements
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
setActiveMatchFilters
public void setActiveMatchFilters(Collection<org.eclipse.search.ui.text.MatchFilter> filters)
Analog for methodsetActiveMatchFilters(MatchFilter[])
working with collections- Parameters:
filters
- the match filters to set or emty collection if the filter state of the match should be ignored, nevernull
-
setActiveMatchFilters
public void setActiveMatchFilters(org.eclipse.search.ui.text.MatchFilter[] filters)
- Overrides:
setActiveMatchFilters
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getAllMatchFilters
public org.eclipse.search.ui.text.MatchFilter[] getAllMatchFilters()
- Overrides:
getAllMatchFilters
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getCollectionMatches
protected Collection<org.eclipse.search.ui.text.Match> getCollectionMatches(Object element)
Analog for methodgetMatches(Object)
returningCollection
of theMatch
es corresponding to theelement
- Parameters:
element
- key element for gettingMatch
es, cannot benull
- Returns:
Match
es corresponding to theelement
, nevernull
-
fireChange
protected void fireChange(org.eclipse.search.ui.SearchResultEvent e)
- Overrides:
fireChange
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
-