ChangeApplier (@NotNull List<? extends @NotNull VFileEvent> events) { Set<VirtualFile> toDelete = null; for (VFileEvent event : events) { if (event instanceof VFileDeleteEvent) { if (toDelete == null) { toDelete = new HashSet<>(); } toDelete.add(event.getFile()); } } if (toDelete == null) { return NO_OP; } Set<AntBuildFileBase> antFiles = null; for (AntBuildFileBase file : myBuildFiles) { if (toDelete.contains(file.getVirtualFile())) { if (antFiles == null) { antFiles = new HashSet<>(); } antFiles.add(file); } } return antFiles == null? NO_OP : new FileDeletionChangeApplier(toDelete, antFiles); }