diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/DaemonProgressIndicator.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/DaemonProgressIndicator.java index 9155452fc373..4a4b19de3e3e 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/DaemonProgressIndicator.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/DaemonProgressIndicator.java @@ -89,7 +89,7 @@ public class DaemonProgressIndicator extends AbstractProgressIndicatorBase imple private void doCancel(@Nullable Throwable cause, @NotNull String reason) { if (tryCancel()) { if (LOG.isDebugEnabled()) { - LOG.debug("doCancel(" + this + + LOG.debug("doCancel(" + this + " " + this.getClass() + (reason.isEmpty() ? "" : ", reason: '" + reason + "'") + (cause == null ? "" : ", cause: " + ExceptionUtil.getThrowableText(cause)) + ")" @@ -99,7 +99,18 @@ public class DaemonProgressIndicator extends AbstractProgressIndicatorBase imple if (cause != null) { myTraceableDisposable.killExceptionally(cause); } - ProgressManager.getInstance().executeNonCancelableSection(() -> onCancelled(reason)); + if (LOG.isDebugEnabled()) { + LOG.debug("doCancel; just before onCancelled"); + } + ProgressManager.getInstance().executeNonCancelableSection(() -> { + if (LOG.isDebugEnabled()) { + LOG.debug("doCancel; before onCancelled"); + } + onCancelled(reason); + if (LOG.isDebugEnabled()) { + LOG.debug("doCancel; after onCancelled"); + } + }); } else if (LOG.isDebugEnabled()) { LOG.debug("doCancel on already cancelled(" + this + ")");