boolean (PsiElement element) { if (!(element instanceof PsiJavaToken)) { return false; } final PsiElement parent = element.getParent(); if (!(parent instanceof PsiPolyadicExpression expression)) { return false; } final PsiExpression[] operands = expression.getOperands(); if (operands.length < 2) { return false; } PsiExpression prevOperand = null; for (PsiExpression operand : operands) { final PsiJavaToken token = expression.getTokenBeforeOperand(operand); if (element == token) { if (prevOperand == null || operand.getText().equals(prevOperand.getText())) { return false; } break; } prevOperand = operand; } return !ComparisonUtils.isComparison(expression); }