void (@NotNull VFileCreateEvent event) { VirtualFile f = event.getFile(); DocumentReference ref = f == null ? null : myDeletedFilePathToRef.remove(new FilePath(f.getUrl())); if (ref != null) { f.putUserData(FILE_TO_REF_KEY, new WeakReference<>(ref)); ((DocumentReferenceByVirtualFile)ref).update(f); } }