void (@NotNull VirtualFileListener adapted, @NotNull VFileEvent event) { if (event instanceof VFileContentChangeEvent) { final VFileContentChangeEvent ce = (VFileContentChangeEvent)event; final VirtualFile file = ce.getFile(); adapted.beforeContentsChange( new VirtualFileEvent(event.getRequestor(), file, file.getParent(), ce.getOldModificationStamp(), ce.getModificationStamp())); } else if (event instanceof VFileDeleteEvent) { final VFileDeleteEvent de = (VFileDeleteEvent)event; adapted.beforeFileDeletion(new VirtualFileEvent(event.getRequestor(), de.getFile(), de.getFile().getParent(), 0, 0)); } else if (event instanceof VFileMoveEvent) { final VFileMoveEvent me = (VFileMoveEvent)event; adapted.beforeFileMovement(new VirtualFileMoveEvent(event.getRequestor(), me.getFile(), me.getOldParent(), me.getNewParent())); } else if (event instanceof VFilePropertyChangeEvent) { final VFilePropertyChangeEvent pce = (VFilePropertyChangeEvent)event; adapted.beforePropertyChange( new VirtualFilePropertyEvent(event.getRequestor(), pce.getFile(), pce.getPropertyName(), pce.getOldValue(), pce.getNewValue())); } }