From 3ed1f17e37ad792793574991ec49f44a0d439582 Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Wed, 1 Dec 2021 10:10:46 -0500 Subject: [PATCH] GP-1566 - Updated the Data Types context menu to include all actions when showing the menu from the keyboard via Shift-F10. --- .../app/plugin/core/datamgr/DataTypesProvider.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java index f267775258..206d3aa35f 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java @@ -340,6 +340,15 @@ public class DataTypesProvider extends ComponentProviderAdapter { clickedNode = archiveGTree.getNodeForLocation(point.x, point.y); isToolbarAction = false; } + else { + // Called via a keybinding; use the selected node in the tree to represent the clicked + // node. This allows users to use a keybinding to show the context menu and have all + // actions installed. + TreePath path = archiveGTree.getSelectionPath(); + if (path != null) { + clickedNode = (GTreeNode) path.getLastPathComponent(); + } + } return new DataTypesActionContext(this, plugin.getProgram(), archiveGTree, clickedNode, isToolbarAction);