LocalChangeList addChangeList(
      String id,
      @NotNull final String name,
      @Nullable final String description,
      final boolean inUpdate,
      @Nullable Object data) {
    final boolean contains = myMap.containsKey(name);
    LOG.assertTrue(!contains, "Attempt to create duplicate changelist " + name);
    final LocalChangeListImpl newList =
        (LocalChangeListImpl) LocalChangeList.createEmptyChangeList(myProject, name);
    newList.setData(data);

    if (description != null) {
      newList.setCommentImpl(description);
    }
    if (id != null) {
      newList.setId(id);
    }
    myMap.put(name, newList);
    if (inUpdate) {
      // scope is not important: nothing had been added jet, nothing to move to "old state" members
      newList.startProcessingChanges(
          myProject, null); // this is executed only when use through GATE
    }
    return newList.copy();
  }