void (PsiExpression condition, Set<? super PsiExpression> conditions, IElementType wantedTokenType) { condition = PsiUtil.skipParenthesizedExprDown(condition); if (condition == null) return; if (condition instanceof PsiPolyadicExpression polyadicExpression) { final IElementType tokenType = polyadicExpression.getOperationTokenType(); if (wantedTokenType.equals(tokenType)) { final PsiExpression[] operands = polyadicExpression.getOperands(); for (PsiExpression operand : operands) { collectConditionsForExpression(operand, conditions, wantedTokenType); } return; } } while (true) { PsiExpression negated = BoolUtils.getNegated(condition); if (negated == null) break; condition = negated; } conditions.add(condition); }