diff options
Diffstat (limited to 'platform/core-api/src/com/intellij/openapi/progress/ProgressIndicatorProvider.java')
-rw-r--r-- | platform/core-api/src/com/intellij/openapi/progress/ProgressIndicatorProvider.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/core-api/src/com/intellij/openapi/progress/ProgressIndicatorProvider.java b/platform/core-api/src/com/intellij/openapi/progress/ProgressIndicatorProvider.java index 0f50f8d05ecf..afe440b8588f 100644 --- a/platform/core-api/src/com/intellij/openapi/progress/ProgressIndicatorProvider.java +++ b/platform/core-api/src/com/intellij/openapi/progress/ProgressIndicatorProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ public abstract class ProgressIndicatorProvider { @Nullable public static ProgressIndicatorProvider ourInstance; - @Nullable public static ProgressIndicatorProvider getInstance() { return ourInstance; } @@ -39,6 +38,7 @@ public abstract class ProgressIndicatorProvider { return ourInstance != null ? ourInstance.getProgressIndicator() : null; } + @NotNull public abstract NonCancelableSection startNonCancelableSection(); @NotNull @@ -46,12 +46,12 @@ public abstract class ProgressIndicatorProvider { return ourInstance != null ? ourInstance.startNonCancelableSection() : NonCancelableSection.EMPTY; } - public static volatile boolean ourNeedToCheckCancel = false; + protected static volatile boolean ourNeedToCheckCancel = false; public static void checkCanceled() throws ProcessCanceledException { // smart optimization! There's a thread started in ProgressManagerImpl, that set's this flag up once in 10 milliseconds if (ourNeedToCheckCancel && ourInstance != null) { + ourNeedToCheckCancel = false; // doCheckCanceled() may flip it back to true ourInstance.doCheckCanceled(); - ourNeedToCheckCancel = false; } } } |