org.mockcentral.editor.search
Class SearchManager

java.lang.Object
  extended by org.mockcentral.editor.search.SearchManager

public class SearchManager
extends java.lang.Object

A class used to manage searching for java elements, providing an embedded TypeNameRequestor to accept matching results which are then used to construct MatchingType instances.

Author:
David Hutchinson

Constructor Summary
SearchManager()
           
 
Method Summary
 java.util.ArrayList<MatchingType> doSearch(char[] typename, int typeMatchRule)
          Searches the workspace scope using the SearchPattern.R_PREFIX_MATCH for java elements matching the supplied typename and element type match rule, returning an ArrayList of MatchingType instances containing information about all results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchManager

public SearchManager()
Method Detail

doSearch

public java.util.ArrayList<MatchingType> doSearch(char[] typename,
                                                  int typeMatchRule)
                                           throws org.eclipse.jdt.core.JavaModelException
Searches the workspace scope using the SearchPattern.R_PREFIX_MATCH for java elements matching the supplied typename and element type match rule, returning an ArrayList of MatchingType instances containing information about all results.

Parameters:
typename - the char array containing the type name to search for.
typeMatchRule - the element type match rule to use during the search, one of IJavaSearchConstants.CLASS, IJavaSearchConstants.INTERFACE or IJavaSearchConstants.ENUM;
Returns:
an ArrayList of MatchingType instances containing information about all results.
Throws:
org.eclipse.jdt.core.JavaModelException - if the search failed.