From e9b25e08d6595b1a12ff3e3e8d5987f84467e77f Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Wed, 20 Jan 2016 15:32:52 +0300 Subject: [PATCH] IDEA-43728 - fixed incorrect commands postponing while evaluation in progress --- .../engine/events/DebuggerContextCommandImpl.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/events/DebuggerContextCommandImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/events/DebuggerContextCommandImpl.java index 767811b4d274..b92395c887e0 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/events/DebuggerContextCommandImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/events/DebuggerContextCommandImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -66,12 +66,6 @@ public abstract class DebuggerContextCommandImpl extends SuspendContextCommandIm @Override public final void contextAction() throws Exception { - // with custom thread we have the right context already - if (myCustomThread != null) { - threadAction(); - return; - } - SuspendManager suspendManager = myDebuggerContext.getDebugProcess().getSuspendManager(); boolean isSuspendedByContext; try { @@ -89,8 +83,9 @@ public abstract class DebuggerContextCommandImpl extends SuspendContextCommandIm threadAction(); } else { - // there are no suspend context currently registered - SuspendContextImpl suspendContextForThread = SuspendManagerUtil.findContextByThread(suspendManager, getThread()); + // no suspend context currently available + SuspendContextImpl suspendContextForThread = myCustomThread != null ? getSuspendContext() : + SuspendManagerUtil.findContextByThread(suspendManager, getThread()); if (suspendContextForThread != null) { suspendContextForThread.postponeCommand(this); }