public class BasicSearchEngine
extends java.lang.Object
SearchEngine
for detailed comment), now uses basic engine functionalities.
Note that search basic engine does not implement deprecated functionalities...| Modifier and Type | Field and Description |
|---|---|
static boolean |
VERBOSE
For tracing purpose.
|
| Constructor and Description |
|---|
BasicSearchEngine() |
BasicSearchEngine(ICompilationUnit[] workingCopies) |
BasicSearchEngine(WorkingCopyOwner workingCopyOwner) |
| Modifier and Type | Method and Description |
|---|---|
static IJavaSearchScope |
createHierarchyScope(IType type) |
static IJavaSearchScope |
createHierarchyScope(IType type,
WorkingCopyOwner owner) |
static IJavaSearchScope |
createJavaSearchScope(boolean excludeTestCode,
IJavaElement[] elements) |
static IJavaSearchScope |
createJavaSearchScope(boolean excludeTestCode,
IJavaElement[] elements,
boolean includeReferencedProjects) |
static IJavaSearchScope |
createJavaSearchScope(boolean excludeTestCode,
IJavaElement[] elements,
int includeMask) |
static IJavaSearchScope |
createJavaSearchScope(IJavaElement[] elements) |
static IJavaSearchScope |
createJavaSearchScope(IJavaElement[] elements,
boolean includeReferencedProjects) |
static IJavaSearchScope |
createJavaSearchScope(IJavaElement[] elements,
int includeMask) |
static MethodNameMatch |
createMethodNameMatch(IMethod method,
int modifiers) |
static IJavaSearchScope |
createStrictHierarchyScope(IJavaProject project,
IType type,
boolean onlySubtypes,
boolean includeFocusType,
WorkingCopyOwner owner) |
static TypeNameMatch |
createTypeNameMatch(IType type,
int modifiers) |
static IJavaSearchScope |
createWorkspaceScope() |
static SearchParticipant |
getDefaultSearchParticipant()
Returns a new default Java search participant.
|
static java.lang.String |
getMatchRuleString(int matchRule) |
static java.lang.String |
getSearchForString(int searchFor)
Return kind of search corresponding to given value.
|
void |
search(SearchPattern pattern,
SearchParticipant[] participants,
IJavaSearchScope scope,
SearchRequestor requestor,
IProgressMonitor monitor)
Searches for matches of a given search pattern.
|
void |
searchAllConstructorDeclarations(char[] packageName,
char[] typeName,
int typeMatchRule,
IJavaSearchScope scope,
IRestrictedAccessConstructorRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor) |
void |
searchAllMethodNames(char[] packageName,
int pkgMatchRule,
char[] declaringQualification,
int declQualificationMatchRule,
char[] declaringSimpleName,
int declSimpleNameMatchRule,
char[] methodName,
int methodMatchRule,
IJavaSearchScope scope,
IRestrictedAccessMethodRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
Searches for all method declarations in the given scope.
|
void |
searchAllMethodNames(char[] qualifier,
int qualifierMatchRule,
char[] methodName,
int methodMatchRule,
IJavaSearchScope scope,
IRestrictedAccessMethodRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
Searches for all method declarations in the given scope.
|
void |
searchAllSecondaryTypeNames(IPackageFragmentRoot[] sourceFolders,
IRestrictedAccessTypeRequestor nameRequestor,
boolean waitForIndexes,
IProgressMonitor progressMonitor)
Searches for all secondary types in the given scope.
|
void |
searchAllTypeNames(char[][] qualifications,
char[][] typeNames,
int matchRule,
int searchFor,
IJavaSearchScope scope,
IRestrictedAccessTypeRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
Searches for all top-level types and member types in the given scope using a case sensitive exact match
with the given qualified names and type names.
|
void |
searchAllTypeNames(char[] packageName,
int packageMatchRule,
char[] typeName,
int typeMatchRule,
int searchFor,
IJavaSearchScope scope,
IRestrictedAccessTypeRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
Searches for all top-level types and member types in the given scope.
|
void |
searchDeclarations(IJavaElement enclosingElement,
SearchRequestor requestor,
SearchPattern pattern,
IProgressMonitor monitor) |
void |
searchDeclarationsOfAccessedFields(IJavaElement enclosingElement,
SearchRequestor requestor,
IProgressMonitor monitor)
Searches for all declarations of the fields accessed in the given element.
|
void |
searchDeclarationsOfReferencedTypes(IJavaElement enclosingElement,
SearchRequestor requestor,
IProgressMonitor monitor)
Searches for all declarations of the types referenced in the given element.
|
void |
searchDeclarationsOfSentMessages(IJavaElement enclosingElement,
SearchRequestor requestor,
IProgressMonitor monitor)
Searches for all declarations of the methods invoked in the given element.
|
public BasicSearchEngine()
public BasicSearchEngine(ICompilationUnit[] workingCopies)
for detailed comment.public BasicSearchEngine(WorkingCopyOwner workingCopyOwner)
for detailed comment.public static IJavaSearchScope createHierarchyScope(IType type) throws JavaModelException
JavaModelExceptionfor detailed comment.public static IJavaSearchScope createHierarchyScope(IType type, WorkingCopyOwner owner) throws JavaModelException
JavaModelExceptionfor detailed comment.public static IJavaSearchScope createStrictHierarchyScope(IJavaProject project, IType type, boolean onlySubtypes, boolean includeFocusType, WorkingCopyOwner owner) throws JavaModelException
JavaModelExceptionfor detailed comment.public static IJavaSearchScope createJavaSearchScope(IJavaElement[] elements)
for detailed comment.public static IJavaSearchScope createJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements)
public static IJavaSearchScope createJavaSearchScope(IJavaElement[] elements, boolean includeReferencedProjects)
public static IJavaSearchScope createJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements, boolean includeReferencedProjects)
for detailed comment.public static IJavaSearchScope createJavaSearchScope(IJavaElement[] elements, int includeMask)
public static IJavaSearchScope createJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements, int includeMask)
for detailed comment.public static TypeNameMatch createTypeNameMatch(IType type, int modifiers)
for detailed comment.public static MethodNameMatch createMethodNameMatch(IMethod method, int modifiers)
for detailed comment.public static IJavaSearchScope createWorkspaceScope()
for detailed comment.public static SearchParticipant getDefaultSearchParticipant()
public static java.lang.String getMatchRuleString(int matchRule)
matchRule - public static java.lang.String getSearchForString(int searchFor)
searchFor - public void search(SearchPattern pattern, SearchParticipant[] participants, IJavaSearchScope scope, SearchRequestor requestor, IProgressMonitor monitor) throws CoreException
CoreExceptionfor detailed commentpublic void searchAllConstructorDeclarations(char[] packageName,
char[] typeName,
int typeMatchRule,
IJavaSearchScope scope,
IRestrictedAccessConstructorRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
throws JavaModelException
JavaModelExceptionpublic void searchAllMethodNames(char[] qualifier,
int qualifierMatchRule,
char[] methodName,
int methodMatchRule,
IJavaSearchScope scope,
IRestrictedAccessMethodRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
throws JavaModelException
Warning: This API is in experimental phase and may be modified/removed. Do not use this until this comment is removed.
JavaModelExceptionfor detailed commentspublic void searchAllMethodNames(char[] packageName,
int pkgMatchRule,
char[] declaringQualification,
int declQualificationMatchRule,
char[] declaringSimpleName,
int declSimpleNameMatchRule,
char[] methodName,
int methodMatchRule,
IJavaSearchScope scope,
IRestrictedAccessMethodRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
throws JavaModelException
Warning: This API is in experimental phase and may be modified/removed. Do not use this until this comment is removed.
JavaModelExceptionfor detailed commentspublic void searchAllSecondaryTypeNames(IPackageFragmentRoot[] sourceFolders, IRestrictedAccessTypeRequestor nameRequestor, boolean waitForIndexes, IProgressMonitor progressMonitor) throws JavaModelException
JavaModelExceptionpublic void searchAllTypeNames(char[] packageName,
int packageMatchRule,
char[] typeName,
int typeMatchRule,
int searchFor,
IJavaSearchScope scope,
IRestrictedAccessTypeRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
throws JavaModelException
JavaModelExceptionfor detailed commentpublic void searchAllTypeNames(char[][] qualifications,
char[][] typeNames,
int matchRule,
int searchFor,
IJavaSearchScope scope,
IRestrictedAccessTypeRequestor nameRequestor,
int waitingPolicy,
IProgressMonitor progressMonitor)
throws JavaModelException
JavaModelExceptionfor detailed commentpublic void searchDeclarations(IJavaElement enclosingElement, SearchRequestor requestor, SearchPattern pattern, IProgressMonitor monitor) throws JavaModelException
JavaModelExceptionpublic void searchDeclarationsOfAccessedFields(IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException
JavaModelExceptionfor detailed commentpublic void searchDeclarationsOfReferencedTypes(IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException
JavaModelExceptionfor detailed commentpublic void searchDeclarationsOfSentMessages(IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException
JavaModelExceptionfor detailed comment