mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] provide recreate main log handler in constructor
This commit is contained in:
@@ -54,8 +54,7 @@ public class VcsLogManager implements Disposable {
|
||||
|
||||
@NotNull private final Project myProject;
|
||||
@NotNull private final VcsLogTabsProperties myUiProperties;
|
||||
|
||||
@Nullable private Runnable myRecreateMainLogHandler;
|
||||
@Nullable private final Runnable myRecreateMainLogHandler;
|
||||
|
||||
private volatile VcsLogUiImpl myUi;
|
||||
@NotNull private final VcsLogDataManager myDataManager;
|
||||
@@ -64,8 +63,16 @@ public class VcsLogManager implements Disposable {
|
||||
@NotNull private final PostponableLogRefresher myPostponableRefresher;
|
||||
|
||||
public VcsLogManager(@NotNull Project project, @NotNull VcsLogTabsProperties uiProperties, @NotNull Collection<VcsRoot> roots) {
|
||||
this(project, uiProperties, roots, null);
|
||||
}
|
||||
|
||||
public VcsLogManager(@NotNull Project project,
|
||||
@NotNull VcsLogTabsProperties uiProperties,
|
||||
@NotNull Collection<VcsRoot> roots,
|
||||
@Nullable Runnable recreateHandler) {
|
||||
myProject = project;
|
||||
myUiProperties = uiProperties;
|
||||
myRecreateMainLogHandler = recreateHandler;
|
||||
|
||||
Map<VirtualFile, VcsLogProvider> logProviders = findLogProviders(roots, myProject);
|
||||
myDataManager = new VcsLogDataManager(myProject, logProviders, new MyFatalErrorsConsumer());
|
||||
@@ -151,10 +158,6 @@ public class VcsLogManager implements Disposable {
|
||||
return logProviders;
|
||||
}
|
||||
|
||||
public void setRecreateMainLogHandler(@Nullable Runnable recreateMainLogHandler) {
|
||||
myRecreateMainLogHandler = recreateMainLogHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* The instance of the {@link VcsLogUiImpl} or null if the log was not initialized yet.
|
||||
*/
|
||||
|
||||
@@ -59,8 +59,7 @@ public class VcsLogProjectManager {
|
||||
|
||||
public boolean initData() {
|
||||
if (myLogManager != null) return true;
|
||||
myLogManager = new VcsLogManager(myProject, myUiProperties, getVcsRoots());
|
||||
myLogManager.setRecreateMainLogHandler(myRecreateMainLogHandler);
|
||||
myLogManager = new VcsLogManager(myProject, myUiProperties, getVcsRoots(), myRecreateMainLogHandler);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user