use of org.eclipse.jdt.internal.corext.refactoring.RefactoringSearchEngine2 in project che by eclipse.
the class MemberVisibilityAdjustor method findReferences.
/**
* Finds references to the specified member.
* @param member the member
* @param monitor the progress monitor to use
* @return the search result groups
* @throws JavaModelException if an error occurs during search
*/
private SearchResultGroup[] findReferences(final IMember member, final IProgressMonitor monitor) throws JavaModelException {
final RefactoringSearchEngine2 engine = new RefactoringSearchEngine2(SearchPattern.createPattern(member, IJavaSearchConstants.REFERENCES, SearchUtils.GENERICS_AGNOSTIC_MATCH_RULE));
engine.setOwner(fOwner);
engine.setFiltering(true, true);
engine.setScope(RefactoringScopeFactory.create(member));
engine.searchPattern(new SubProgressMonitor(monitor, 1));
return (SearchResultGroup[]) engine.getResults();
}
Aggregations