From dea64a101fd4d58349aa2199467b387f2e38765d Mon Sep 17 00:00:00 2001 From: Konstantin Ulitin Date: Tue, 24 Jul 2018 17:28:53 +0300 Subject: [PATCH] Debugger: "Add to Watches" for multiple selection (WEB-13852) --- .../ui/tree/actions/XAddToWatchesTreeAction.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/actions/XAddToWatchesTreeAction.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/actions/XAddToWatchesTreeAction.java index cd28f8798b6a..357b4e400ac3 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/actions/XAddToWatchesTreeAction.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/actions/XAddToWatchesTreeAction.java @@ -22,6 +22,18 @@ public class XAddToWatchesTreeAction extends XDebuggerTreeActionBase { return super.isEnabled(node, e) && DebuggerUIUtil.hasEvaluationExpression(node.getValueContainer()) && getWatchesView(e) != null; } + @Override + public void actionPerformed(AnActionEvent e) { + for (XValueNodeImpl node : getSelectedNodes(e.getDataContext())) { + if (node != null) { + String nodeName = node.getName(); + if (nodeName != null) { + perform(node, nodeName, e); + } + } + } + } + @Override protected void perform(final XValueNodeImpl node, @NotNull final String nodeName, final AnActionEvent e) { final XWatchesView watchesView = getWatchesView(e);