void () { if (myAddedFiles.isEmpty() || myMovedFiles.isEmpty()) return; Map<String, VirtualFile> addedPaths = new HashMap<>(myAddedFiles.size()); for (VirtualFile file : myAddedFiles) { addedPaths.put(file.getPath(), file); } for (Iterator<MovedFileInfo> iterator = myMovedFiles.iterator(); iterator.hasNext(); ) { MovedFileInfo movedFile = iterator.next(); VirtualFile oldAdded = addedPaths.get(movedFile.myOldPath); if (oldAdded != null) { iterator.remove(); myAddedFiles.remove(oldAdded); myAddedFiles.add(movedFile.myFile); if (isFileCopyingFromTrackingSupported()) { myCopyFromMap.put(oldAdded, movedFile.myFile); } } } }