void (LocalTask task, boolean newTask) { List<ChangeListInfo> changeLists = task.getChangeLists(); ChangeListManager changeListManager = ChangeListManager.getInstance(myProject); if (changeLists.isEmpty() || !changeListManager.areChangeListsEnabled()) { task.getChangeLists().clear(); task.addChangelist(new ChangeListInfo(changeListManager.getDefaultChangeList())); } else { ChangeListInfo info = changeLists.get(0); LocalChangeList changeList = changeListManager.getChangeList(info.id); if (changeList == null) { changeList = changeListManager.addChangeList(info.name, info.comment); info.id = changeList.getId(); } changeListManager.setDefaultChangeList(changeList); } unshelveChanges(task); }