From 8e9b5aea6ddb02ea4f257418d2eaa407ce1eed80 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Thu, 22 Dec 2011 18:14:27 +0100 Subject: [PATCH] XDebugger: action toolbar in Variables view --- platform/platform-resources/src/idea/LangActions.xml | 3 +++ .../com/intellij/xdebugger/impl/actions/XDebuggerActions.java | 1 + .../src/com/intellij/xdebugger/impl/frame/XVariablesView.java | 4 ++++ .../src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index ab6672be5f61..83c2df79e895 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -702,6 +702,9 @@ + + + diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/XDebuggerActions.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/XDebuggerActions.java index 5e3de16c1ebd..b3d65c4fd433 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/XDebuggerActions.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/XDebuggerActions.java @@ -43,6 +43,7 @@ public interface XDebuggerActions { @NonNls String TOOL_WINDOW_LEFT_TOOLBAR_GROUP = "XDebugger.ToolWindow.LeftToolbar"; @NonNls String EVALUATE_DIALOG_TREE_POPUP_GROUP = "XDebugger.Evaluation.Dialog.Tree.Popup"; @NonNls String INSPECT_TREE_POPUP_GROUP = "XDebugger.Inspect.Tree.Popup"; + @NonNls String VARIABLES_TREE_TOOLBAR_GROUP = "XDebugger.Variables.Tree.Toolbar"; @NonNls String VARIABLES_TREE_POPUP_GROUP = "XDebugger.Variables.Tree.Popup"; @NonNls String WATCHES_TREE_POPUP_GROUP = "XDebugger.Watches.Tree.Popup"; @NonNls String WATCHES_TREE_TOOLBAR_GROUP = "XDebugger.Watches.Tree.Toolbar"; diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesView.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesView.java index 04f38e0f97c8..ceff94df6b9f 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesView.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesView.java @@ -86,6 +86,10 @@ public class XVariablesView extends XDebugViewBase { } } + public XDebuggerTree getTree() { + return myDebuggerTreePanel.getTree(); + } + public JComponent getPanel() { return myDebuggerTreePanel.getMainPanel(); } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java index 30a204ab41ca..177f04560a45 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebugSessionTab.java @@ -84,6 +84,10 @@ public class XDebugSessionTab extends DebuggerSessionTabBase { XDebuggerBundle.message("debugger.session.tab.variables.title"), XDebuggerUIConstants.VARIABLES_TAB_ICON, null); result.setCloseable(false); + + ActionGroup group = getActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP); + result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree()); + return result; }