use of org.gradle.internal.watch.registry.impl.SnapshotCollectingDiffListener in project gradle by gradle.
the class WatchingVirtualFileSystem method updateNotifyingListeners.
@Override
protected SnapshotHierarchy updateNotifyingListeners(UpdateFunction updateFunction) {
if (watchRegistry == null) {
return updateFunction.update(SnapshotHierarchy.NodeDiffListener.NOOP);
} else {
SnapshotCollectingDiffListener diffListener = new SnapshotCollectingDiffListener();
SnapshotHierarchy newRoot = updateFunction.update(diffListener);
return withWatcherChangeErrorHandling(newRoot, () -> diffListener.publishSnapshotDiff((removedSnapshots, addedSnapshots) -> watchRegistry.virtualFileSystemContentsChanged(removedSnapshots, addedSnapshots, newRoot)));
}
}
Aggregations