JIVE Platform
Release 0.3.1

edu.buffalo.cse.jive.ui.search
Class ExecutionHistorySearchQuery

java.lang.Object
  extended by edu.buffalo.cse.jive.ui.search.AbstractJiveSearchQuery
      extended by edu.buffalo.cse.jive.ui.search.ExecutionHistorySearchQuery
All Implemented Interfaces:
SequenceModel.EventVisitor, IJiveSearchQuery, ISearchQuery
Direct Known Subclasses:
ExceptionCaughtSearchQuery, InvariantViolatedSearchQuery, LineExecutedSearchQuery, MethodCalledSearchQuery, MethodReturnedSearchQuery, ObjectCreatedSearchQuery, VariableChangedSearchQuery

public abstract class ExecutionHistorySearchQuery
extends AbstractJiveSearchQuery
implements SequenceModel.EventVisitor

An abstract search query over the execution history of an IJiveDebugTarget. The query implements the SequenceModel.EventVisitor interface, but leaves the details up to extending classes. This class is responsible for traversing the sequence model and periodically checking if the user has canceled the query. It also provides a mechanism for adding matches to the result set.

See Also:
addMatch(EventOccurrence)

Constructor Summary
protected ExecutionHistorySearchQuery()
          Creates an execution history query.
 
Method Summary
protected  void addMatch(EventOccurrence event)
          Adds a search query match to the search result.
 Class<? extends Object> getResultType()
          Returns the type of search result matches collected by the search query.
 IStatus performSearch(IProgressMonitor monitor, IJiveDebugTarget target)
          Performs the query over the given IJiveDebugTarget using the supplied IProgressMonitor.
 
Methods inherited from class edu.buffalo.cse.jive.ui.search.AbstractJiveSearchQuery
canRerun, canRunInBackground, createSearchResult, getLabel, getSearchResult, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.buffalo.cse.jive.sequence.SequenceModel.EventVisitor
visit, visit
 
Methods inherited from interface edu.buffalo.cse.jive.ui.search.IJiveSearchQuery
getImageDescriptor, getResultLabel
 

Constructor Detail

ExecutionHistorySearchQuery

protected ExecutionHistorySearchQuery()
Creates an execution history query.

Method Detail

performSearch

public IStatus performSearch(IProgressMonitor monitor,
                             IJiveDebugTarget target)
Description copied from interface: IJiveSearchQuery
Performs the query over the given IJiveDebugTarget using the supplied IProgressMonitor. Implementors can call this method for each target in existence.

Specified by:
performSearch in interface IJiveSearchQuery
Parameters:
monitor - the progress monitor of the search
target - the target to search
Returns:
the status after completing the search

getResultType

public Class<? extends Object> getResultType()
Description copied from interface: IJiveSearchQuery
Returns the type of search result matches collected by the search query. This is used by the Search view to determine how to display the search result tabularly.

NOTE: This will be changed in the future. For now, return Event.class for a result containing matches of mixed event types or return the specific class literal for a result containing matches of a single event type (e.g., AssignEvent.class).

Specified by:
getResultType in interface IJiveSearchQuery
Returns:
the type of search result matches

addMatch

protected void addMatch(EventOccurrence event)
Adds a search query match to the search result.

Parameters:
event - the match to add to the search result

JIVE Platform
Release 0.3.1