use of com.intellij.util.AsynchConsumer in project intellij-community by JetBrains.
the class SvnCommittedChangesProvider method loadCommittedChanges.
@Override
public void loadCommittedChanges(@NotNull ChangeBrowserSettings settings, @NotNull RepositoryLocation location, int maxCount, @NotNull AsynchConsumer<CommittedChangeList> consumer) throws VcsException {
try {
SvnRepositoryLocation svnLocation = (SvnRepositoryLocation) location;
String repositoryRoot = getRepositoryRoot(svnLocation);
ChangeBrowserSettings.Filter filter = settings.createFilter();
Consumer<LogEntry> resultConsumer = logEntry -> {
SvnChangeList list = new SvnChangeList(myVcs, svnLocation, logEntry, repositoryRoot);
if (filter.accepts(list)) {
consumer.consume(list);
}
};
SvnTarget target = SvnTarget.fromURL(svnLocation.toSvnUrl(), createBeforeRevision(settings));
getCommittedChangesImpl(settings, target, maxCount, resultConsumer, false, true);
} finally {
consumer.finished();
}
}
Aggregations