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 for
AbstractTextSearchResult
. In this class containing collections of the matches were changed from
List
to HashSet
for acceleration. Also added special methods for getting matches by key object as Collection
.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructs a newCustomtTextSearchResult
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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[]
org.eclipse.search.ui.text.MatchFilter[]
protected Collection<org.eclipse.search.ui.text.Match>
getCollectionMatches
(Object element) Analog for methodgetMatches(Object)
returningCollection
of theMatch
es corresponding to theelement
Object[]
int
int
getMatchCount
(Object element) org.eclipse.search.ui.text.Match[]
getMatches
(Object element) void
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
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 Details
-
OptimizedTextSearchResult
protected OptimizedTextSearchResult()Constructs a newCustomtTextSearchResult
-
-
Method Details
-
getMatches
- 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
- 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
- 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
- Overrides:
getMatchCount
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
getElements
- Overrides:
getElements
in classorg.eclipse.search.ui.text.AbstractTextSearchResult
-
setActiveMatchFilters
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
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
-