org.eclipse.xtend.shared.ui.editor.search.query
Class XtendXpandSearchQuery

java.lang.Object
  extended by org.eclipse.xtend.shared.ui.editor.search.query.XtendXpandSearchQuery
All Implemented Interfaces:
org.eclipse.search.ui.ISearchQuery
Direct Known Subclasses:
XpandXtendSearchDeclarationsQuery, XtendXpandSearchReferencesQuery

public abstract class XtendXpandSearchQuery
extends java.lang.Object
implements org.eclipse.search.ui.ISearchQuery

XtendXpandSearchQuery is a base class for search queries. Queries contain the search parameters for the search and the code that performs the query as well.

Author:
Peter Friese

Constructor Summary
XtendXpandSearchQuery(IXtendXpandProject project, java.lang.String identifier)
          Creates a new XtendXpandSearchQuery.
 
Method Summary
 boolean canRerun()
          
 boolean canRunInBackground()
          
 java.lang.String getIdentifier()
           
 java.lang.String getLabel()
          
 IXtendXpandProject getProject()
          Retrurns the project this query is operating on.
 java.lang.String getResultLabel(int matchCount)
          Returns the label that will be displayed on top of the search result view.
 org.eclipse.search.ui.ISearchResult getSearchResult()
          
protected abstract  java.util.List<SearchMatch> performSearch()
           
 org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtendXpandSearchQuery

public XtendXpandSearchQuery(IXtendXpandProject project,
                             java.lang.String identifier)
Creates a new XtendXpandSearchQuery.

Parameters:
project - The project to run this query on.
identifier - The identifier to look for.
Method Detail

canRerun

public boolean canRerun()

Specified by:
canRerun in interface org.eclipse.search.ui.ISearchQuery

canRunInBackground

public boolean canRunInBackground()

Specified by:
canRunInBackground in interface org.eclipse.search.ui.ISearchQuery

getLabel

public java.lang.String getLabel()

Specified by:
getLabel in interface org.eclipse.search.ui.ISearchQuery

getResultLabel

public java.lang.String getResultLabel(int matchCount)
Returns the label that will be displayed on top of the search result view.

Parameters:
matchCount - The number of search matches.
Returns:
The text for the search result view label.

getSearchResult

public org.eclipse.search.ui.ISearchResult getSearchResult()

Specified by:
getSearchResult in interface org.eclipse.search.ui.ISearchQuery

run

public org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
                                     throws org.eclipse.core.runtime.OperationCanceledException

Specified by:
run in interface org.eclipse.search.ui.ISearchQuery
Throws:
org.eclipse.core.runtime.OperationCanceledException

performSearch

protected abstract java.util.List<SearchMatch> performSearch()
Returns:

getIdentifier

public java.lang.String getIdentifier()

getProject

public IXtendXpandProject getProject()
Retrurns the project this query is operating on.

Returns:
The project this query is operating on.