Search in sources :

Example 1 with AsynchConsumer

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();
    }
}
Also used : AsynchConsumer(com.intellij.util.AsynchConsumer) SvnBindException(org.jetbrains.idea.svn.commandLine.SvnBindException) VcsRevisionNumber(com.intellij.openapi.vcs.history.VcsRevisionNumber) VirtualFile(com.intellij.openapi.vfs.VirtualFile) Date(java.util.Date) ProgressManager.progress(com.intellij.openapi.progress.ProgressManager.progress) VcsCommittedViewAuxiliary(com.intellij.openapi.vcs.changes.committed.VcsCommittedViewAuxiliary) VcsCommittedListsZipper(com.intellij.openapi.vcs.changes.committed.VcsCommittedListsZipper) PairConsumer(com.intellij.util.PairConsumer) SvnBundle.message(org.jetbrains.idea.svn.SvnBundle.message) ChangeBrowserSettings(com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings) ApplicationManager.getApplication(com.intellij.openapi.application.ApplicationManager.getApplication) Collections.singletonList(java.util.Collections.singletonList) ConfigureBranchesAction(org.jetbrains.idea.svn.branchConfig.ConfigureBranchesAction) ProcessCanceledException(com.intellij.openapi.progress.ProcessCanceledException) MessageBusConnection(com.intellij.util.messages.MessageBusConnection) SvnUtil(org.jetbrains.idea.svn.SvnUtil) ProgressManager.progress2(com.intellij.openapi.progress.ProgressManager.progress2) SvnVcs(org.jetbrains.idea.svn.SvnVcs) FileUtil(com.intellij.openapi.util.io.FileUtil) Logger(com.intellij.openapi.diagnostic.Logger) com.intellij.openapi.vcs(com.intellij.openapi.vcs) CommittedChangeList(com.intellij.openapi.vcs.versionBrowser.CommittedChangeList) VcsUtil(com.intellij.vcsUtil.VcsUtil) DataOutput(java.io.DataOutput) DecoratorManager(com.intellij.openapi.vcs.changes.committed.DecoratorManager) SVNException(org.tmatesoft.svn.core.SVNException) Collection(java.util.Collection) Set(java.util.Set) VcsConfigurationChangeListener(com.intellij.openapi.vcs.changes.committed.VcsConfigurationChangeListener) IOException(java.io.IOException) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) File(java.io.File) ContainerUtil.newArrayList(com.intellij.util.containers.ContainerUtil.newArrayList) Nullable(org.jetbrains.annotations.Nullable) StatusType(org.jetbrains.idea.svn.status.StatusType) Depth(org.jetbrains.idea.svn.api.Depth) List(java.util.List) SVNRevision(org.tmatesoft.svn.core.wc.SVNRevision) SVNURL(org.tmatesoft.svn.core.SVNURL) ContainerUtil.newHashSet(com.intellij.util.containers.ContainerUtil.newHashSet) Pair(com.intellij.openapi.util.Pair) DataInput(java.io.DataInput) ChangesBrowserSettingsEditor(com.intellij.openapi.vcs.versionBrowser.ChangesBrowserSettingsEditor) Registry(com.intellij.openapi.util.registry.Registry) NotNull(org.jetbrains.annotations.NotNull) SvnTarget(org.tmatesoft.svn.core.wc2.SvnTarget) Consumer(com.intellij.util.Consumer) ChangeBrowserSettings(com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings) SvnTarget(org.tmatesoft.svn.core.wc2.SvnTarget)

Aggregations

DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)1 ApplicationManager.getApplication (com.intellij.openapi.application.ApplicationManager.getApplication)1 Logger (com.intellij.openapi.diagnostic.Logger)1 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)1 ProgressManager.progress (com.intellij.openapi.progress.ProgressManager.progress)1 ProgressManager.progress2 (com.intellij.openapi.progress.ProgressManager.progress2)1 Pair (com.intellij.openapi.util.Pair)1 FileUtil (com.intellij.openapi.util.io.FileUtil)1 Registry (com.intellij.openapi.util.registry.Registry)1 com.intellij.openapi.vcs (com.intellij.openapi.vcs)1 DecoratorManager (com.intellij.openapi.vcs.changes.committed.DecoratorManager)1 VcsCommittedListsZipper (com.intellij.openapi.vcs.changes.committed.VcsCommittedListsZipper)1 VcsCommittedViewAuxiliary (com.intellij.openapi.vcs.changes.committed.VcsCommittedViewAuxiliary)1 VcsConfigurationChangeListener (com.intellij.openapi.vcs.changes.committed.VcsConfigurationChangeListener)1 VcsRevisionNumber (com.intellij.openapi.vcs.history.VcsRevisionNumber)1 ChangeBrowserSettings (com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings)1 ChangesBrowserSettingsEditor (com.intellij.openapi.vcs.versionBrowser.ChangesBrowserSettingsEditor)1 CommittedChangeList (com.intellij.openapi.vcs.versionBrowser.CommittedChangeList)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 AsynchConsumer (com.intellij.util.AsynchConsumer)1