use of org.jetbrains.plugins.groovy.lang.resolve.processors.GrScopeProcessorWithHints in project intellij-community by JetBrains.
the class GrUnresolvedAccessChecker method doCheckContainer.
private static boolean doCheckContainer(final PsiMethod patternMethod, PsiElement container, final String name) {
final Ref<Boolean> result = new Ref<>(false);
PsiScopeProcessor processor = new GrScopeProcessorWithHints(name, ClassHint.RESOLVE_KINDS_METHOD) {
@Override
public boolean execute(@NotNull PsiElement element, @NotNull ResolveState state) {
if (element instanceof PsiMethod && name.equals(((PsiMethod) element).getName()) && patternMethod.getParameterList().getParametersCount() == ((PsiMethod) element).getParameterList().getParametersCount() && isNotFromGroovyObject((PsiMethod) element)) {
result.set(true);
return false;
}
return true;
}
};
ResolveUtil.treeWalkUp(container, processor, true);
return result.get();
}
Aggregations