Class 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 Detail

      • OptimizedTextSearchResult

        protected OptimizedTextSearchResult()
        Constructs a new CustomtTextSearchResult
    • Method Detail

      • getMatches

        public org.eclipse.search.ui.text.Match[] getMatches​(Object element)
        Overrides:
        getMatches in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • addMatch

        public void addMatch​(org.eclipse.search.ui.text.Match match)
        Overrides:
        addMatch in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • addMatches

        public void addMatches​(Collection<org.eclipse.search.ui.text.Match> matches)
        Analog for method addMatches(Match[]) working with Collection of the Matches
        Parameters:
        matches - the matches to add, cannot be null
      • removeAll

        public void removeAll()
        Overrides:
        removeAll in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • removeMatch

        public void removeMatch​(org.eclipse.search.ui.text.Match match)
        Overrides:
        removeMatch in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • addMatches

        public void addMatches​(org.eclipse.search.ui.text.Match[] matches)
        Overrides:
        addMatches in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • removeMatches

        public void removeMatches​(org.eclipse.search.ui.text.Match[] matches)
        Overrides:
        removeMatches in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • removeMatches

        public void removeMatches​(Collection<org.eclipse.search.ui.text.Match> matches)
        Analog for method removeMatches(Match[]) working with Collection of the Matches
        Parameters:
        matches - the matches to remove, cannot be null
      • addListener

        public void addListener​(org.eclipse.search.ui.ISearchResultListener l)
        Specified by:
        addListener in interface org.eclipse.search.ui.ISearchResult
        Overrides:
        addListener in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • removeListener

        public void removeListener​(org.eclipse.search.ui.ISearchResultListener l)
        Specified by:
        removeListener in interface org.eclipse.search.ui.ISearchResult
        Overrides:
        removeListener in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • getActiveMatchFilters

        public org.eclipse.search.ui.text.MatchFilter[] getActiveMatchFilters()
        Overrides:
        getActiveMatchFilters in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • getMatchCount

        public int getMatchCount()
        Overrides:
        getMatchCount in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • getMatchCount

        public int getMatchCount​(Object element)
        Overrides:
        getMatchCount in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • getElements

        public Object[] getElements()
        Overrides:
        getElements in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • setActiveMatchFilters

        public void setActiveMatchFilters​(Collection<org.eclipse.search.ui.text.MatchFilter> filters)
        Analog for method setActiveMatchFilters(MatchFilter[]) working with collections
        Parameters:
        filters - the match filters to set or emty collection if the filter state of the match should be ignored, never null
      • setActiveMatchFilters

        public void setActiveMatchFilters​(org.eclipse.search.ui.text.MatchFilter[] filters)
        Overrides:
        setActiveMatchFilters in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • getAllMatchFilters

        public org.eclipse.search.ui.text.MatchFilter[] getAllMatchFilters()
        Overrides:
        getAllMatchFilters in class org.eclipse.search.ui.text.AbstractTextSearchResult
      • getCollectionMatches

        protected Collection<org.eclipse.search.ui.text.Match> getCollectionMatches​(Object element)
        Analog for method getMatches(Object) returning Collection of the Matches corresponding to the element
        Parameters:
        element - key element for getting Matches, cannot be null
        Returns:
        Matches corresponding to the element, never null
      • fireChange

        protected void fireChange​(org.eclipse.search.ui.SearchResultEvent e)
        Overrides:
        fireChange in class org.eclipse.search.ui.text.AbstractTextSearchResult