boolean (@NotNull PsiPolyadicExpression expression, @Nullable IElementType tokenBefore, boolean isNegated, @NotNull StringBuilder sb) { PsiExpression[] operands = expression.getOperands(); for (int i = 0; i < operands.length; i++) { PsiExpression operand = operands[i]; IElementType tokenType = EliminateUtils.getOperandTokenType(expression, operand, tokenBefore); boolean isOperandNegated = i == 0 && isNegated; if (operand == myOperand) { operand = EliminateUtils.processPrefixed(operand, false, (op, isOpNegated) -> ObjectUtils.tryCast(PsiUtil.skipParenthesizedExprDown(op), PsiPolyadicExpression.class)); if (operand == null) return false; } PsiPolyadicExpression polyadic = ObjectUtils.tryCast(operand, PsiPolyadicExpression.class); if (polyadic != null && EliminateUtils.isMultiplicative(polyadic.getOperationTokenType())) { if (!eliminateMultiplicativeExpression(polyadic, tokenType, isOperandNegated, sb)) return false; continue; } if (!EliminateUtils.processPrefixed(operand, false, (op, isOpNegated) -> eliminateOperand(op, tokenType, isOperandNegated, sb))) { return false; } } return true; }