org.eclipse.xtext.ui.editor.findrefs
Class ReferenceSearchResult

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.findrefs.ReferenceSearchResult
All Implemented Interfaces:
org.eclipse.search.ui.ISearchResult, IAcceptor<IReferenceDescription>

public class ReferenceSearchResult
extends java.lang.Object
implements org.eclipse.search.ui.ISearchResult, IAcceptor<IReferenceDescription>

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
protected ReferenceSearchResult(ReferenceQuery query)
           
 
Method Summary
 void accept(IReferenceDescription referenceDescription)
           
 void addListener(org.eclipse.search.ui.ISearchResultListener l)
          Adds a ISearchResultListener.
 void finish()
           
 org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
          Returns an image descriptor for the given ISearchResult.
 java.lang.String getLabel()
          Returns a user readable label for this search result.
 java.util.List<IReferenceDescription> getMatchingReferences()
           
 org.eclipse.search.ui.ISearchQuery getQuery()
          Returns the query that produced this search result.
 java.lang.String getTooltip()
          Returns a tooltip to be used when this search result is shown in the UI.
 void removeListener(org.eclipse.search.ui.ISearchResultListener l)
          Removes a ISearchResultChangedListener.
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceSearchResult

protected ReferenceSearchResult(ReferenceQuery query)
Method Detail

addListener

public void addListener(org.eclipse.search.ui.ISearchResultListener l)
Description copied from interface: org.eclipse.search.ui.ISearchResult
Adds a ISearchResultListener. Has no effect when the listener has already been added.

Specified by:
addListener in interface org.eclipse.search.ui.ISearchResult
Parameters:
l - the listener to be added

removeListener

public void removeListener(org.eclipse.search.ui.ISearchResultListener l)
Description copied from interface: org.eclipse.search.ui.ISearchResult
Removes a ISearchResultChangedListener. Has no effect when the listener hasn't previously been added.

Specified by:
removeListener in interface org.eclipse.search.ui.ISearchResult
Parameters:
l - the listener to be removed

getImageDescriptor

public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
Description copied from interface: org.eclipse.search.ui.ISearchResult
Returns an image descriptor for the given ISearchResult.

Specified by:
getImageDescriptor in interface org.eclipse.search.ui.ISearchResult
Returns:
an image representing this search result or null

getLabel

public java.lang.String getLabel()
Description copied from interface: org.eclipse.search.ui.ISearchResult
Returns a user readable label for this search result. The label is typically used in the result view and should contain the search query string and number of matches.

Specified by:
getLabel in interface org.eclipse.search.ui.ISearchResult
Returns:
the label for this search result

getQuery

public org.eclipse.search.ui.ISearchQuery getQuery()
Description copied from interface: org.eclipse.search.ui.ISearchResult
Returns the query that produced this search result.

Specified by:
getQuery in interface org.eclipse.search.ui.ISearchResult
Returns:
the query producing this result

getTooltip

public java.lang.String getTooltip()
Description copied from interface: org.eclipse.search.ui.ISearchResult
Returns a tooltip to be used when this search result is shown in the UI.

Specified by:
getTooltip in interface org.eclipse.search.ui.ISearchResult
Returns:
a user readable String

accept

public void accept(IReferenceDescription referenceDescription)
Specified by:
accept in interface IAcceptor<IReferenceDescription>

getMatchingReferences

public java.util.List<IReferenceDescription> getMatchingReferences()

reset

public void reset()

finish

public void finish()