void (@NotNull ChangeListWorker updatedWorker, @NotNull ChangeListDeltaListener deltaListener) { assert myMainWorker; assert myChangeListsEnabled == updatedWorker.myChangeListsEnabled; HashMap<Change, ListData> oldChangeMappings = new HashMap<>(myChangeMappings); notifyPathsChanged(myIdx, updatedWorker.myIdx, deltaListener); myIdx.copyFrom(updatedWorker.myIdx); myAffectedPaths = new AffectedPathSet(myIdx.getAffectedPaths()); myChangeMappings.clear(); Map<ListData, ListData> listMapping = copyListsDataFrom(updatedWorker.myLists); for (Change change : myIdx.getChanges()) { PartialChangeTracker tracker = getChangeTrackerFor(change); if (tracker == null) { ListData oldList = updatedWorker.myChangeMappings.get(change); ListData newList = null; if (oldList == null) { if (updatedWorker.getChangeTrackerFor(change) == null) { LOG.error("Change mapping not found"); } } else { newList = listMapping.get(oldList); if (newList == null) { LOG.error("List mapping not found"); } } if (newList == null) { ListData oldMappedList = oldChangeMappings.get(change); if (oldMappedList != null) newList = getDataById(oldMappedList.id); } if (newList == null) newList = myDefault; myChangeMappings.put(change, newList); } } myDelayedNotificator.allChangeListsMappingsChanged(); if (LOG.isDebugEnabled()) { LOG.debug(String.format("[applyChangesFromUpdate] %s", this)); } }