void (@NotNull VirtualFile file) { boolean isCaseSensitive = isCaseSensitive(); String name = file.getName(); synchronized (myData) { int indexInReal = findIndex(myData.myChildrenIds, name, isCaseSensitive); if (indexInReal >= 0) { // it can be that we ask to add a name to the adopted list whereas it is already contained in the real part - // in this case, we should remove it from the latter myData.myChildrenIds = ArrayUtil.remove(myData.myChildrenIds, indexInReal); } if (!allChildrenLoaded()) { myData.addAdoptedName(name, isCaseSensitive); } assertConsistency(isCaseSensitive, file); } }