Class BasicSearchEngine
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.BasicSearchEngine
Search basic engine. Public search engine (see
SearchEngine
for detailed comment), now uses basic engine functionalities.
Note that search basic engine does not implement deprecated functionalities...-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBasicSearchEngine(ICompilationUnit[] workingCopies)BasicSearchEngine(WorkingCopyOwner workingCopyOwner) -
Method Summary
Modifier and TypeMethodDescriptionstatic IJavaSearchScopecreateHierarchyScope(IType type)static IJavaSearchScopecreateHierarchyScope(IType type, WorkingCopyOwner owner)static IJavaSearchScopecreateJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements)static IJavaSearchScopecreateJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements, boolean includeReferencedProjects)static IJavaSearchScopecreateJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements, int includeMask)static IJavaSearchScopecreateJavaSearchScope(IJavaElement[] elements)static IJavaSearchScopecreateJavaSearchScope(IJavaElement[] elements, boolean includeReferencedProjects)static IJavaSearchScopecreateJavaSearchScope(IJavaElement[] elements, int includeMask)static MethodNameMatchcreateMethodNameMatch(IMethod method, int modifiers)static IJavaSearchScopecreateStrictHierarchyScope(IJavaProject project, IType type, boolean onlySubtypes, boolean includeFocusType, WorkingCopyOwner owner)static TypeNameMatchcreateTypeNameMatch(IType type, int modifiers)static IJavaSearchScopestatic SearchParticipantReturns a new default Java search participant.static StringgetMatchRuleString(int matchRule)static StringgetSearchForString(int searchFor)Return kind of search corresponding to given value.voidsearch(SearchPattern pattern, SearchParticipant[] participants, IJavaSearchScope scope, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor)Searches for matches of a given search pattern.voidsearchAllConstructorDeclarations(char[] packageName, char[] typeName, int typeMatchRule, IJavaSearchScope scope, IRestrictedAccessConstructorRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor)voidsearchAllMethodNames(char[] packageName, int pkgMatchRule, char[] declaringQualification, int declQualificationMatchRule, char[] declaringSimpleName, int declSimpleNameMatchRule, char[] methodName, int methodMatchRule, IJavaSearchScope scope, IRestrictedAccessMethodRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor)Searches for all method declarations in the given scope.voidsearchAllMethodNames(char[] qualifier, int qualifierMatchRule, char[] methodName, int methodMatchRule, IJavaSearchScope scope, IRestrictedAccessMethodRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor)Searches for all method declarations in the given scope.voidsearchAllSecondaryTypeNames(IPackageFragmentRoot[] sourceFolders, IRestrictedAccessTypeRequestor nameRequestor, boolean waitForIndexes, org.eclipse.core.runtime.IProgressMonitor progressMonitor)Searches for all secondary types in the given scope.voidsearchAllTypeNames(char[][] qualifications, char[][] typeNames, int matchRule, int searchFor, IJavaSearchScope scope, IRestrictedAccessTypeRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.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.voidsearchAllTypeNames(char[] packageName, int packageMatchRule, char[] typeName, int typeMatchRule, int searchFor, IJavaSearchScope scope, IRestrictedAccessTypeRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor)Searches for all top-level types and member types in the given scope.voidsearchDeclarations(IJavaElement enclosingElement, SearchRequestor requestor, SearchPattern pattern, org.eclipse.core.runtime.IProgressMonitor monitor)voidsearchDeclarationsOfAccessedFields(IJavaElement enclosingElement, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor)Searches for all declarations of the fields accessed in the given element.voidsearchDeclarationsOfReferencedTypes(IJavaElement enclosingElement, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor)Searches for all declarations of the types referenced in the given element.voidsearchDeclarationsOfSentMessages(IJavaElement enclosingElement, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor)Searches for all declarations of the methods invoked in the given element.
-
Field Details
-
VERBOSE
public static boolean VERBOSEFor tracing purpose.
-
-
Constructor Details
-
BasicSearchEngine
public BasicSearchEngine() -
BasicSearchEngine
- See Also:
for detailed comment.
-
BasicSearchEngine
- See Also:
for detailed comment.
-
-
Method Details
-
createHierarchyScope
- Throws:
JavaModelException- See Also:
for detailed comment.
-
createHierarchyScope
public static IJavaSearchScope createHierarchyScope(IType type, WorkingCopyOwner owner) throws JavaModelException- Throws:
JavaModelException- See Also:
for detailed comment.
-
createStrictHierarchyScope
public static IJavaSearchScope createStrictHierarchyScope(IJavaProject project, IType type, boolean onlySubtypes, boolean includeFocusType, WorkingCopyOwner owner) throws JavaModelException- Throws:
JavaModelException- See Also:
for detailed comment.
-
createJavaSearchScope
- See Also:
for detailed comment.
-
createJavaSearchScope
public static IJavaSearchScope createJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements) -
createJavaSearchScope
public static IJavaSearchScope createJavaSearchScope(IJavaElement[] elements, boolean includeReferencedProjects) -
createJavaSearchScope
public static IJavaSearchScope createJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements, boolean includeReferencedProjects)- See Also:
for detailed comment.
-
createJavaSearchScope
-
createJavaSearchScope
public static IJavaSearchScope createJavaSearchScope(boolean excludeTestCode, IJavaElement[] elements, int includeMask)- See Also:
for detailed comment.
-
createTypeNameMatch
- See Also:
for detailed comment.
-
createMethodNameMatch
- See Also:
for detailed comment.
-
createWorkspaceScope
- See Also:
for detailed comment.
-
getDefaultSearchParticipant
Returns a new default Java search participant.- Returns:
- a new default Java search participant
- Since:
- 3.0
-
getMatchRuleString
- Parameters:
matchRule-
-
getSearchForString
Return kind of search corresponding to given value.- Parameters:
searchFor-
-
search
public void search(SearchPattern pattern, SearchParticipant[] participants, IJavaSearchScope scope, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreExceptionSearches for matches of a given search pattern. Search patterns can be created using helper methods (from a String pattern or a Java element) and encapsulate the description of what is being searched (for example, search method declarations in a case sensitive way).- Throws:
org.eclipse.core.runtime.CoreException- See Also:
for detailed comment
-
searchAllConstructorDeclarations
public void searchAllConstructorDeclarations(char[] packageName, char[] typeName, int typeMatchRule, IJavaSearchScope scope, IRestrictedAccessConstructorRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelException- Throws:
JavaModelException
-
searchAllMethodNames
public void searchAllMethodNames(char[] qualifier, int qualifierMatchRule, char[] methodName, int methodMatchRule, IJavaSearchScope scope, IRestrictedAccessMethodRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelExceptionSearches for all method declarations in the given scope. *Warning: This API is in experimental phase and may be modified/removed. Do not use this until this comment is removed.
- Throws:
JavaModelException- See Also:
for detailed comments
-
searchAllMethodNames
public void searchAllMethodNames(char[] packageName, int pkgMatchRule, char[] declaringQualification, int declQualificationMatchRule, char[] declaringSimpleName, int declSimpleNameMatchRule, char[] methodName, int methodMatchRule, IJavaSearchScope scope, IRestrictedAccessMethodRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelExceptionSearches for all method declarations in the given scope. *Warning: This API is in experimental phase and may be modified/removed. Do not use this until this comment is removed.
- Throws:
JavaModelException- See Also:
for detailed comments
-
searchAllSecondaryTypeNames
public void searchAllSecondaryTypeNames(IPackageFragmentRoot[] sourceFolders, IRestrictedAccessTypeRequestor nameRequestor, boolean waitForIndexes, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelExceptionSearches for all secondary types in the given scope. The search can be selecting specific types (given a package or a type name prefix and match modes).- Throws:
JavaModelException
-
searchAllTypeNames
public void searchAllTypeNames(char[] packageName, int packageMatchRule, char[] typeName, int typeMatchRule, int searchFor, IJavaSearchScope scope, IRestrictedAccessTypeRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelExceptionSearches for all top-level types and member types in the given scope. The search can be selecting specific types (given a package or a type name prefix and match modes).- Throws:
JavaModelException- See Also:
for detailed comment
-
searchAllTypeNames
public void searchAllTypeNames(char[][] qualifications, char[][] typeNames, int matchRule, int searchFor, IJavaSearchScope scope, IRestrictedAccessTypeRequestor nameRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelExceptionSearches 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.- Throws:
JavaModelException- See Also:
for detailed comment
-
searchDeclarations
public void searchDeclarations(IJavaElement enclosingElement, SearchRequestor requestor, SearchPattern pattern, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException- Throws:
JavaModelException
-
searchDeclarationsOfAccessedFields
public void searchDeclarationsOfAccessedFields(IJavaElement enclosingElement, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelExceptionSearches for all declarations of the fields accessed in the given element. The element can be a compilation unit or a source type/method/field. Reports the field declarations using the given requestor.- Throws:
JavaModelException- See Also:
for detailed comment
-
searchDeclarationsOfReferencedTypes
public void searchDeclarationsOfReferencedTypes(IJavaElement enclosingElement, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelExceptionSearches for all declarations of the types referenced in the given element. The element can be a compilation unit or a source type/method/field. Reports the type declarations using the given requestor.- Throws:
JavaModelException- See Also:
for detailed comment
-
searchDeclarationsOfSentMessages
public void searchDeclarationsOfSentMessages(IJavaElement enclosingElement, SearchRequestor requestor, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelExceptionSearches for all declarations of the methods invoked in the given element. The element can be a compilation unit or a source type/method/field. Reports the method declarations using the given requestor.- Throws:
JavaModelException- See Also:
for detailed comment
-