From 9ec671069e9977ef653d38f216219c2845862484 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Fri, 19 Aug 2016 16:24:59 +0300 Subject: [PATCH] register new and remove actions with common shortcuts --- .../xdebugger/impl/frame/XWatchesViewImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XWatchesViewImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XWatchesViewImpl.java index a71bf5422c22..2bd7d9f9c368 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XWatchesViewImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XWatchesViewImpl.java @@ -26,10 +26,7 @@ import com.intellij.openapi.actionSystem.impl.ActionToolbarImpl; import com.intellij.openapi.ide.CopyPasteManager; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.EmptyRunnable; -import com.intellij.ui.CaptionPanel; -import com.intellij.ui.ClickListener; -import com.intellij.ui.DoubleClickListener; -import com.intellij.ui.ListenerUtil; +import com.intellij.ui.*; import com.intellij.ui.border.CustomLineBorder; import com.intellij.util.Alarm; import com.intellij.util.containers.ContainerUtil; @@ -88,6 +85,11 @@ public class XWatchesViewImpl extends XVariablesView implements DnDNativeTarget, DebuggerUIUtil.registerActionOnComponent(XDebuggerActions.XCOPY_WATCH, tree, myDisposables); DebuggerUIUtil.registerActionOnComponent(XDebuggerActions.XEDIT_WATCH, tree, myDisposables); + EmptyAction.registerWithShortcutSet(XDebuggerActions.XNEW_WATCH, + CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.ADD), tree); + EmptyAction.registerWithShortcutSet(XDebuggerActions.XREMOVE_WATCH, + CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.REMOVE), tree); + DnDManager.getInstance().registerTarget(this, tree); new AnAction() {