public boolean editName(@NotNull final String fromName, @NotNull final String toName) { if (fromName.equals(toName)) return false; final LocalChangeList list = myMap.get(fromName); final boolean canEdit = list != null && (!list.isReadOnly()); if (canEdit) { final LocalChangeListImpl listImpl = (LocalChangeListImpl) list; listImpl.setNameImpl(toName); myMap.remove(fromName); myMap.put(toName, list); final ChangeListEditHandler editHandler = listImpl.getEditHandler(); if (editHandler != null) { listImpl.setCommentImpl( editHandler.changeCommentOnChangeName(toName, listImpl.getComment())); } } return canEdit; }