PsiExpression (@NotNull PsiAssignmentExpression assignmentExpression) { PsiExpression expression = assignmentExpression.getRExpression(); if (expression == null) return null; Object constantExpression = ExpressionUtils.computeConstantExpression(expression); if (!(constantExpression instanceof String)) return null; return expression; }