From 44e645df2ff295170e4157cb4bbcff9092b63655 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Wed, 11 Nov 2009 17:17:36 +0300 Subject: [PATCH] -Didea.ProcessCanceledException is back --- .../src/com/intellij/openapi/progress/impl/ProgressManagerImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/impl/ProgressManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/progress/impl/ProgressManagerImpl.java index c60d800da2..e49a5b47e6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/impl/ProgressManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/impl/ProgressManagerImpl.java @@ -50,9 +50,10 @@ public class ProgressManagerImpl extends ProgressManager { private static volatile int ourLockedCheckCounter = 0; private final List myFunComponentProviders = new ArrayList(); @NonNls private static final String NAME = "Progress Cancel Checker"; + private static final boolean DISABLED = Comparing.equal(System.getProperty(PROCESS_CANCELED_EXCEPTION), "disabled"); public ProgressManagerImpl(Application application) { - if (!application.isUnitTestMode() && !Comparing.equal(System.getProperty(PROCESS_CANCELED_EXCEPTION), "disabled")) { + if (!application.isUnitTestMode() && !DISABLED) { new Thread(NAME) { public void run() { while (true) { @@ -76,6 +77,9 @@ public class ProgressManagerImpl extends ProgressManager { progress.checkCanceled(); } catch (ProcessCanceledException e) { + if (DISABLED) { + return; + } if (Thread.holdsLock(PsiLock.LOCK)) { ourLockedCheckCounter++; if (ourLockedCheckCounter > 10) { -- 2.11.4.GIT