ExpressionToConstantComparison (PsiExpression candidate) { candidate = PsiUtil.skipParenthesizedExprDown(candidate); EqualityCheck check = EqualityCheck.from(candidate); if (check != null) { return fromComparison(candidate, check.getLeft(), check.getRight()); } PsiBinaryExpression binOp = tryCast(candidate, PsiBinaryExpression.class); if (binOp != null && JavaTokenType.EQEQ.equals(binOp.getOperationTokenType())) { return fromComparison(candidate, binOp.getLOperand(), binOp.getROperand()); } return null; }