void (@NotNull List<? extends @NotNull VFileEvent> events) { if (!IS_UNIT_TEST_MODE) { synchronized (myUnprocessedEvents) { myUnprocessedEvents.addAll(events); } myAutomakeTrigger.execute(() -> { if (!application.isDisposed()) { ReadAction.run(()-> { if (application.isDisposed()) { return; } final List<VFileEvent> snapshot; synchronized (myUnprocessedEvents) { if (myUnprocessedEvents.isEmpty()) { return; } snapshot = new ArrayList<>(myUnprocessedEvents); myUnprocessedEvents.clear(); } if (shouldTriggerMake(snapshot)) { scheduleAutoMake(); } }); } else { synchronized (myUnprocessedEvents) { myUnprocessedEvents.clear(); } } }); } }