private static boolean isSimpleAssignment(PsiAssignmentExpression assignmentExpression, PsiElement parent) {
    final IElementType parentTokenType;
    if (parent instanceof PsiExpressionStatement) {
      return true;
    }
    else if (parent instanceof PsiAssignmentExpression parentAssignmentExpression) {
      parentTokenType = parentAssignmentExpression.getOperationTokenType();
    }
    else if (parent instanceof PsiVariable) {
      parentTokenType = JavaTokenType.EQ;
    }
    else {
      return false;
    }
    final IElementType tokenType = assignmentExpression.getOperationTokenType();
    return parentTokenType.equals(tokenType);
  }
private static boolean isSimpleAssignment(PsiAssignmentExpression assignmentExpression, PsiElement parent)