[vcs-log] register VcsLogData on VcsLogManager

This commit is contained in:
Julia Beliaeva
2017-08-21 02:23:16 +03:00
parent c15adc11e5
commit 4368c15a3c
2 changed files with 5 additions and 3 deletions
@@ -86,7 +86,8 @@ public class VcsLogData implements Disposable, VcsLogDataProvider {
public VcsLogData(@NotNull Project project,
@NotNull Map<VirtualFile, VcsLogProvider> logProviders,
@NotNull FatalErrorHandler fatalErrorsConsumer) {
@NotNull FatalErrorHandler fatalErrorsConsumer,
@NotNull Disposable parentDisposable) {
myProject = project;
myLogProviders = logProviders;
myUserRegistry = (VcsUserRegistryImpl)ServiceManager.getService(project, VcsUserRegistry.class);
@@ -125,6 +126,8 @@ public class VcsLogData implements Disposable, VcsLogDataProvider {
this::fireDataPackChangeEvent, FAILING_EXCEPTION_HANDLER, RECENT_COMMITS_COUNT);
myContainingBranchesGetter = new ContainingBranchesGetter(this, this);
Disposer.register(parentDisposable, this);
}
@NotNull
@@ -73,7 +73,7 @@ public class VcsLogManager implements Disposable {
myRecreateMainLogHandler = recreateHandler;
Map<VirtualFile, VcsLogProvider> logProviders = findLogProviders(roots, myProject);
myLogData = new VcsLogData(myProject, logProviders, new MyFatalErrorsHandler());
myLogData = new VcsLogData(myProject, logProviders, new MyFatalErrorsHandler(), this);
myPostponableRefresher = new PostponableLogRefresher(myLogData);
myTabsLogRefresher = new VcsLogTabsWatcher(myProject, myPostponableRefresher, myLogData);
@@ -174,7 +174,6 @@ public class VcsLogManager implements Disposable {
@Override
public void dispose() {
Disposer.dispose(myLogData);
}
@NotNull