mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] do not check for registry in VcsLogProgress (never use status bar progress)
This commit is contained in:
@@ -235,7 +235,7 @@ public class VcsLogData implements Disposable, VcsLogDataProvider {
|
||||
}
|
||||
}
|
||||
};
|
||||
myDataLoaderQueue.run(backgroundable, null, myRefresher.getProgress().createProgressIndicator(backgroundable));
|
||||
myDataLoaderQueue.run(backgroundable, null, myRefresher.getProgress().createProgressIndicator());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,7 +67,7 @@ public class VcsLogFiltererImpl implements VcsLogFilterer {
|
||||
UIUtil.invokeLaterIfNeeded(() -> {
|
||||
MyTask task = new MyTask(project, "Applying filters...");
|
||||
ProgressManager.getInstance().runProcessWithProgressAsynchronously(task,
|
||||
myLogData.getProgress().createProgressIndicator(task));
|
||||
myLogData.getProgress().createProgressIndicator());
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,11 +19,8 @@ import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.progress.EmptyProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator;
|
||||
import com.intellij.openapi.progress.util.AbstractProgressIndicatorBase;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -37,16 +34,11 @@ public class VcsLogProgress {
|
||||
private int myRunningTasksCount = 0;
|
||||
|
||||
@NotNull
|
||||
public ProgressIndicator createProgressIndicator(@NotNull Task.Backgroundable task) {
|
||||
public ProgressIndicator createProgressIndicator() {
|
||||
if (ApplicationManager.getApplication().isHeadlessEnvironment()) {
|
||||
return new EmptyProgressIndicator();
|
||||
}
|
||||
else if (showProgressInLog()) {
|
||||
return new VcsLogProgressIndicator();
|
||||
}
|
||||
else {
|
||||
return new BackgroundableProcessIndicator(task);
|
||||
}
|
||||
return new VcsLogProgressIndicator();
|
||||
}
|
||||
|
||||
public void addProgressIndicatorListener(@NotNull ProgressListener listener, @Nullable Disposable parentDisposable) {
|
||||
@@ -92,10 +84,6 @@ public class VcsLogProgress {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean showProgressInLog() {
|
||||
return Registry.is("vcs.log.keep.up.to.date");
|
||||
}
|
||||
|
||||
private class VcsLogProgressIndicator extends AbstractProgressIndicatorBase {
|
||||
@Override
|
||||
public synchronized void start() {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class VcsLogRefresherImpl implements VcsLogRefresher {
|
||||
protected void startNewBackgroundTask(@NotNull final Task.Backgroundable refreshTask) {
|
||||
UIUtil.invokeLaterIfNeeded(() -> {
|
||||
LOG.debug("Starting a background task...");
|
||||
ProgressManager.getInstance().runProcessWithProgressAsynchronously(refreshTask, myProgress.createProgressIndicator(refreshTask));
|
||||
ProgressManager.getInstance().runProcessWithProgressAsynchronously(refreshTask, myProgress.createProgressIndicator());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user