mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
use indicator which is less dependencies demanding
This commit is contained in:
@@ -20,6 +20,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.util.AbstractProgressIndicatorBase;
|
||||
import com.intellij.openapi.progress.util.ProgressIndicatorBase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.util.Processor;
|
||||
@@ -177,7 +178,7 @@ public class JobUtilTest extends PlatformTestCase {
|
||||
ProgressIndicator actualIndicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
if (progress == null) {
|
||||
assertNotNull(actualIndicator);
|
||||
assertTrue(actualIndicator instanceof ProgressIndicatorBase);
|
||||
assertTrue(actualIndicator instanceof AbstractProgressIndicatorBase);
|
||||
}
|
||||
else {
|
||||
assertTrue(actualIndicator instanceof SensitiveProgressWrapper);
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.util.ProgressIndicatorBase;
|
||||
import com.intellij.openapi.progress.util.AbstractProgressIndicatorBase;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.Processor;
|
||||
@@ -120,7 +120,7 @@ public class JobLauncherImpl extends JobLauncher {
|
||||
@NotNull final Processor<T> thingProcessor) throws ProcessCanceledException {
|
||||
if (things.isEmpty()) return true;
|
||||
// supply our own indicator even if we haven't given one - to support cancellation
|
||||
final ProgressIndicator wrapper = progress == null ? new ProgressIndicatorBase() : new SensitiveProgressWrapper(progress);
|
||||
final ProgressIndicator wrapper = progress == null ? new AbstractProgressIndicatorBase() : new SensitiveProgressWrapper(progress);
|
||||
|
||||
if (things.size() <= 1 || JobSchedulerImpl.CORES_COUNT <= CORES_FORK_THRESHOLD) {
|
||||
final AtomicBoolean result = new AtomicBoolean(true);
|
||||
|
||||
Reference in New Issue
Block a user