PsiVariable (@NotNull PsiArrayInitializerExpression initializer) { PsiVariable variableLocal = null; final PsiElement parent = initializer.getParent(); if (parent instanceof PsiVariable) { variableLocal = (PsiVariable)parent; } else if (parent instanceof PsiNewExpression newExpressionLocal) { final PsiElement newParent = newExpressionLocal.getParent(); if (newParent instanceof PsiAssignmentExpression) { variableLocal = getFromAssignment((PsiAssignmentExpression)newParent); } else if (newParent instanceof PsiVariable) { variableLocal = (PsiVariable)newParent; } } else if (parent instanceof PsiAssignmentExpression) { variableLocal = getFromAssignment((PsiAssignmentExpression)parent); } return variableLocal; }