@Override
    protected void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) {
      final PsiExpression expression = ObjectUtils.tryCast(element, PsiExpression.class);
      if (!(getArrayExpressionOrItself(expression) instanceof PsiReferenceExpression)) {
        return;
      }
      final PsiElement parent = PsiUtil.skipParenthesizedExprUp(expression.getParent());
      if (parent instanceof PsiVariable) {
        expression.delete();
      }
      else if (parent instanceof PsiAssignmentExpression assignmentExpression) {
        PsiElement grandParent = PsiUtil.skipParenthesizedExprUp(assignmentExpression.getParent());
        if (grandParent instanceof PsiAssignmentExpression) {
          grandParent.replace(assignmentExpression);
        }
        else if (grandParent instanceof PsiExpressionStatement) {
          grandParent.delete();
        }
        else if (grandParent instanceof PsiVariable variable) {
          PsiExpression rhs = assignmentExpression.getRExpression();
          variable.setInitializer(rhs == null ? null : (PsiExpression)rhs.copy());
        }
        else {
          assignmentExpression.replace(expression);
        }
      }
    }
@Override
    protected void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater)