use of com.intellij.psi.util.MethodSignatureBackedByPsiMethod in project intellij-community by JetBrains.
the class MethodSuperSearcher method execute.
@Override
public boolean execute(@NotNull final SuperMethodsSearch.SearchParameters queryParameters, @NotNull final Processor<MethodSignatureBackedByPsiMethod> consumer) {
final PsiClass parentClass = queryParameters.getPsiClass();
final PsiMethod method = queryParameters.getMethod();
return ApplicationManager.getApplication().runReadAction((Computable<Boolean>) () -> {
HierarchicalMethodSignature signature = method.getHierarchicalMethodSignature();
final boolean checkBases = queryParameters.isCheckBases();
final boolean allowStaticMethod = queryParameters.isAllowStaticMethod();
final List<HierarchicalMethodSignature> supers = signature.getSuperSignatures();
for (HierarchicalMethodSignature superSignature : supers) {
if (MethodSignatureUtil.isSubsignature(superSignature, signature)) {
if (!addSuperMethods(superSignature, method, parentClass, allowStaticMethod, checkBases, consumer))
return false;
}
}
return true;
});
}
Aggregations