public static Query<PsiReference> search(final SearchParameters parameters) { final Query<PsiReference> result = INSTANCE.createQuery(parameters); if(parameters.isSharedOptimizer) { return uniqueResults(result); } final SearchRequestCollector requests = parameters.getOptimizer(); Project project = PsiUtilCore.getProjectInReadAction(parameters.getMethod()); return uniqueResults(new MergeQuery<PsiReference>(result, new SearchRequestQuery(project, requests))); }
public static Query<PsiModifierListOwner> search(@NotNull PsiClass annotationClass, @NotNull SearchScope scope) { final Query<PsiMember> members = AnnotatedMembersSearch.search(annotationClass, scope); final Query<PsiPackage> packages = AnnotatedPackagesSearch.search(annotationClass, scope); return new MergeQuery<PsiModifierListOwner>(members, packages); }
public static Query<PsiModifierListOwner> search(@NotNull PsiClass annotationClass, @NotNull SearchScope scope) { final Query<PsiMember> members = AnnotatedMembersSearch.search(annotationClass, scope); final Query<PsiJavaPackage> packages = AnnotatedPackagesSearch.search(annotationClass, scope); return new MergeQuery<PsiModifierListOwner>(members, packages); }