void (@NotNull CommandEvent event) { if (myProject != event.getProject()) return; /* * Create file events cannot be filtered in afterVfsChange since VcsFileListenerContextHelper populated after actual file creation in PathsVerifier.CheckAdded.check * So this commandFinished is the only way to get in sync with VcsFileListenerContextHelper to check if additions need to be filtered. */ List<VFileEvent> afterEvents = ContainerUtil.filter(myEventsToProcess, e -> !(e instanceof VFileCreateEvent) || allowedAddition(e)); myEventsToProcess.clear(); if (afterEvents.isEmpty() && !myProcessor.isAnythingToProcess()) return; processEventsInBackground(afterEvents); }