From ac5ad8cb0c5369ca98aa20c9c4db89e6b37c0fad Mon Sep 17 00:00:00 2001 From: Vyacheslav Moklev Date: Tue, 19 Dec 2023 12:40:03 +0200 Subject: [PATCH] [RDCT] GTW-6734: Do not replace data context in Evaluate Expression handler for remote clients This data context guess and replacement is a hack that allows Evaluate Expression action to work properly in the standalone IDEs. But this doesn't work in CWM and Remote Dev if this action is called from a remote client. Data context in such cases are properly formed by the RDCT Core code, and it should not be replaced by a focus-based guess. GitOrigin-RevId: f19cca7709c3f4b3009daaabe335560729147703 --- .../impl/actions/handlers/XDebuggerEvaluateActionHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerEvaluateActionHandler.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerEvaluateActionHandler.java index c860bd71794b..c90e1733de17 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerEvaluateActionHandler.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerEvaluateActionHandler.java @@ -1,6 +1,7 @@ // Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.xdebugger.impl.actions.handlers; +import com.intellij.codeWithMe.ClientId; import com.intellij.ide.DataManager; import com.intellij.lang.Language; import com.intellij.lang.LanguageUtil; @@ -52,7 +53,7 @@ public class XDebuggerEvaluateActionHandler extends XDebuggerActionHandler { focusOwner = window.getMostRecentFocusOwner(); } } - if (focusOwner != null) { + if (focusOwner != null && ClientId.isCurrentlyUnderLocalId()) { dataContext = DataManager.getInstance().getDataContext(focusOwner); }