void (@NotNull List<? extends @NotNull VFileEvent> events) { InvalidationState state = null; synchronized (ourLock) { for (var event : events) { if (!(event.getFileSystem() instanceof LocalFileSystem)) continue; if (!(event instanceof VFileContentChangeEvent contentChangeEvent)) continue; String path = contentChangeEvent.getPath(); VirtualFile file = contentChangeEvent.getFile(); if (!file.isDirectory()) { state = invalidate(state, path); } else { Collection<String> affectedPaths = ourDominatorsMap.get(path); if (affectedPaths != null) { affectedPaths = new ArrayList<>(affectedPaths); // defensive copying; original may be updated on invalidation for (String affectedPath : affectedPaths) { state = invalidate(state, affectedPath); } } } } } if (state != null) state.scheduleRefresh(); }