void (@NotNull Document document, @NotNull VirtualFile oldFile, @NotNull VirtualFile newFile) { synchronized (lock) { oldFile.putUserData(HARD_REF_TO_DOCUMENT_KEY, null); document.putUserData(FILE_KEY, newFile); newFile.putUserData(HARD_REF_TO_DOCUMENT_KEY, document); } }