@Override public void disassociateFromTask(LocalChangeList changeList) { ChangeListInfo changeListInfo = new ChangeListInfo(changeList); for (LocalTask localTask : getLocalTasks()) { if (localTask.getChangeLists().contains(changeListInfo)) { localTask.removeChangelist(changeListInfo); } } }
private void createChangeList(LocalTask task, String name, @Nullable String comment) { LocalChangeList changeList = myChangeListManager.findChangeList(name); if (changeList == null) { changeList = myChangeListManager.addChangeList(name, comment); } else { final LocalTask associatedTask = getAssociatedTask(changeList); if (associatedTask != null) { associatedTask.removeChangelist(new ChangeListInfo(changeList)); } changeList.setComment(comment); } task.addChangelist(new ChangeListInfo(changeList)); myChangeListManager.setDefaultChangeList(changeList); }