org.eclipse.mylar.tasks.core
Class QueryHitCollector

java.lang.Object
  extended by org.eclipse.mylar.tasks.core.QueryHitCollector
Direct Known Subclasses:
SearchHitCollector

public class QueryHitCollector
extends java.lang.Object

Collects QueryHits resulting from repository search

Author:
Shawn Minto, Rob Elves (generalized from bugzilla)

Field Summary
private static java.lang.String DONE
          The string to display to the user when the query is done
private static java.lang.String MATCH
          The string to display to the user when we have 1 match
private  int matchCount
          The number of matches found
private static java.lang.String MATCHES
          The string to display to the user when we have multiple or no matches
private  org.eclipse.core.runtime.IProgressMonitor monitor
          The progress monitor for the search operation
private  java.util.List<AbstractQueryHit> results
           
private static java.lang.String STARTING
          The string to display to the user while querying
private  TaskList taskList
           
 
Constructor Summary
QueryHitCollector(TaskList tasklist)
           
 
Method Summary
 void aboutToStart(int startMatchCount)
           
 void accept(AbstractQueryHit hit)
           
 void addMatch(AbstractQueryHit hit)
           
 void done()
           
protected  java.lang.String getFormattedMatchesString(int count)
           
 java.util.List<AbstractQueryHit> getHits()
           
 org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
           
 void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

private java.util.List<AbstractQueryHit> results

monitor

private org.eclipse.core.runtime.IProgressMonitor monitor
The progress monitor for the search operation


matchCount

private int matchCount
The number of matches found


STARTING

private static final java.lang.String STARTING
The string to display to the user while querying

See Also:
Constant Field Values

MATCH

private static final java.lang.String MATCH
The string to display to the user when we have 1 match

See Also:
Constant Field Values

MATCHES

private static final java.lang.String MATCHES
The string to display to the user when we have multiple or no matches

See Also:
Constant Field Values

DONE

private static final java.lang.String DONE
The string to display to the user when the query is done

See Also:
Constant Field Values

taskList

private TaskList taskList
Constructor Detail

QueryHitCollector

public QueryHitCollector(TaskList tasklist)
Method Detail

aboutToStart

public void aboutToStart(int startMatchCount)
                  throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

accept

public void accept(AbstractQueryHit hit)
            throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

done

public void done()

getFormattedMatchesString

protected java.lang.String getFormattedMatchesString(int count)

getProgressMonitor

public org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()

setProgressMonitor

public void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)

addMatch

public void addMatch(AbstractQueryHit hit)

getHits

public java.util.List<AbstractQueryHit> getHits()