PsiBinaryExpression (@Nullable PsiExpression expression) { PsiBinaryExpression condition = tryCast(PsiUtil.skipParenthesizedExprDown(expression), PsiBinaryExpression.class); if (condition == null) return null; IElementType tokenType = condition.getOperationTokenType(); if (JavaTokenType.LT.equals(tokenType) || JavaTokenType.LE.equals(tokenType) || JavaTokenType.GT.equals(tokenType) || JavaTokenType.GE.equals(tokenType)) { return condition; } return null; }