void (VFileEvent event) { if (event instanceof VFileContentChangeEvent) { beforeContentsChange((VFileContentChangeEvent)event); } else if (event instanceof VFilePropertyChangeEvent && ((VFilePropertyChangeEvent)event).isRename() || event instanceof VFileMoveEvent) { VirtualFile f = Objects.requireNonNull(event.getFile()); f.putUserData(WAS_VERSIONED_KEY, myGateway.isVersioned(f)); } else if (event instanceof VFileDeleteEvent) { beforeFileDeletion((VFileDeleteEvent)event); } }