use indicator which is less dependencies demanding

This commit is contained in:
Alexey Kudravtsev
2013-11-20 14:49:23 +04:00
parent f37078b69f
commit 4e298bcdb5
2 changed files with 4 additions and 3 deletions
@@ -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);