@Nullable
      MyUndoableAction createUndoableAction(@NotNull List<? extends VFileEvent> events) {
        // NOTE: VFS handles renames, so the code for RENAME events is deleted (see history)
        List<? extends VFileEvent> eventsFiltered = JBIterable.from(events).filter(VFileDeleteEvent.class).toList();
        if (eventsFiltered.isEmpty()) return null;

        Map<String, T> removed = new HashMap<>();
        NavigableSet<VirtualFile> navSet = null;

        synchronized (myMappings) {
          ensureStateLoaded();
          for (VFileEvent event : eventsFiltered) {
            VirtualFile file = event.getFile();
            if (file == null) continue;
            String fileUrl = file.getUrl();
            if (!file.isDirectory()) {
              T m = doGetImmediateMapping(file);
              if (m != null) {
                removed.put(fileUrl, m);
              }
            }
            else {
              if (navSet == null) {
                navSet = new TreeSet<>(
                  (f1, f2) -> Comparing.compare(f1 == null ? null : f1.getUrl(), f2 == null ? null : f2.getUrl()));
                navSet.addAll(myMappings.keySet());
              }
              for (VirtualFile child : navSet.tailSet(file)) {
                if (!VfsUtilCore.isAncestor(file, child, false)) break;
                String childUrl = child.getUrl();
                T m = doGetImmediateMapping(child);
                removed.put(childUrl, m);
              }
            }
          }
        }
        return removed.isEmpty() ? null : new MyUndoableAction(new HashMap<>(), removed);
      }
@Nullable
      MyUndoableAction createUndoableAction(@NotNull List<? extends VFileEvent> events)