boolean ( @Nullable PsiExpression expression, @NotNull PsiVariable variable) { if (isReferenceTo(expression, variable)) { return true; } if (!(PsiUtil.skipParenthesizedExprDown(expression) instanceof PsiBinaryExpression binaryExpression)) { return false; } final IElementType tokenType = binaryExpression.getOperationTokenType(); if (!JavaTokenType.PLUS.equals(tokenType) && !JavaTokenType.MINUS.equals(tokenType)) { return false; } final PsiExpression lhs = binaryExpression.getLOperand(); if (expressionIsOffsetVariableLookup(lhs, variable)) { return true; } final PsiExpression rhs = binaryExpression.getROperand(); return expressionIsOffsetVariableLookup(rhs, variable) && !JavaTokenType.MINUS.equals(tokenType); }