void (@NotNull PsiLocalVariable variable, PsiReferenceExpression expression) { PsiCodeBlock block = PsiTreeUtil.getParentOfType(variable, PsiCodeBlock.class); if (block == null) return; final PsiElement[] defs = DefUseUtil.getDefs(block, variable, expression); for (PsiElement def : defs) { if(def instanceof PsiLocalVariable) { final PsiExpression initializer = PsiUtil.deparenthesizeExpression(((PsiLocalVariable)def).getInitializer()); visitPropertyKeyAnnotationParameter(expression, computeStringValue(initializer), initializer); } else if (def instanceof PsiReferenceExpression) { final PsiAssignmentExpression assignment = ExpressionUtils.getAssignment(def.getParent()); if (assignment != null && assignment.getLExpression() == def) { final PsiExpression rhs = PsiUtil.deparenthesizeExpression(assignment.getRExpression()); if (rhs instanceof PsiConditionalExpression conditionalExpression) { final PsiExpression thenExpression = conditionalExpression.getThenExpression(); final PsiExpression elseExpression = conditionalExpression.getElseExpression(); visitPropertyKeyAnnotationParameter(expression, computeStringValue(thenExpression), thenExpression); visitPropertyKeyAnnotationParameter(expression, computeStringValue(elseExpression), elseExpression); } else { visitPropertyKeyAnnotationParameter(expression, computeStringValue(rhs), rhs); } } } } }