private static boolean shouldReset(VFileEvent event) {
    if (event instanceof VFileCreateEvent) {
      return ((VFileCreateEvent)event).isDirectory();
    }
    VirtualFile file = event.getFile();
    return file == null || file.isDirectory();
  }
private static boolean shouldReset(VFileEvent event)