boolean (@NotNull PsiPolyadicExpression expression, @NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) { IElementType tokenType = expression.getOperationTokenType(); boolean and = tokenType.equals(JavaTokenType.ANDAND); boolean or = tokenType.equals(JavaTokenType.OROR); if (!and && !or) return true; ElementClassHint elementClassHint = processor.getHint(ElementClassHint.KEY); if (elementClassHint != null && !elementClassHint.shouldProcess(ElementClassHint.DeclarationKind.VARIABLE)) return true; PatternResolveState wantedHint = PatternResolveState.fromBoolean(and); if (state.get(PatternResolveState.KEY) == wantedHint.invert()) return true; return PsiScopesUtil.walkChildrenScopes(expression, processor, wantedHint.putInto(state), lastParent, place); }