Skip to content

Commit

Permalink
Implement submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
nagi1999a committed Jan 7, 2025
1 parent 04fe2a6 commit 350c5c3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
35 changes: 24 additions & 11 deletions extensions/references-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,44 +317,51 @@
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.copyCallHierarchy",
"submenu": "references-view.copyCallHierarchyMenu",
"group": "1",
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.copyCallHierarchyShort",
"command": "references-view.showOutgoingCalls",
"group": "1",
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.copyCallHierarchyReversed",
"command": "references-view.showIncomingCalls",
"group": "1",
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.copyCallHierarchyReversedShort",
"command": "references-view.showSupertypes",
"group": "1",
"when": "view == references-view.tree && viewItem == call-item"
"when": "view == references-view.tree && viewItem == type-item"
},
{
"command": "references-view.showOutgoingCalls",
"command": "references-view.showSubtypes",
"group": "1",
"when": "view == references-view.tree && viewItem == type-item"
}
],
"references-view.copyCallHierarchyMenu": [
{
"command": "references-view.copyCallHierarchy",
"group": "1",
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.showIncomingCalls",
"command": "references-view.copyCallHierarchyShort",
"group": "1",
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.showSupertypes",
"command": "references-view.copyCallHierarchyReversed",
"group": "1",
"when": "view == references-view.tree && viewItem == type-item"
"when": "view == references-view.tree && viewItem == call-item"
},
{
"command": "references-view.showSubtypes",
"command": "references-view.copyCallHierarchyReversedShort",
"group": "1",
"when": "view == references-view.tree && viewItem == type-item"
"when": "view == references-view.tree && viewItem == call-item"
}
],
"commandPalette": [
Expand Down Expand Up @@ -436,6 +443,12 @@
}
]
},
"submenus": [
{
"id": "references-view.copyCallHierarchyMenu",
"label": "Copy Hierarchy"
}
],
"keybindings": [
{
"command": "references-view.findReferences",
Expand Down
8 changes: 4 additions & 4 deletions extensions/references-view/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"cmd.references-view.showIncomingCalls": "Show Incoming Calls",
"cmd.references-view.removeCallItem": "Dismiss",
"cmd.references-view.copyCallName": "Copy",
"cmd.references-view.copyCallHierarchy": "Copy Hierarchy",
"cmd.references-view.copyCallHierarchyShort": "Copy Hierarchy (Short)",
"cmd.references-view.copyCallHierarchyReversed": "Copy Hierarchy (Reversed)",
"cmd.references-view.copyCallHierarchyReversedShort": "Copy Hierarchy (Reversed, Short)",
"cmd.references-view.copyCallHierarchy": "Default Style",
"cmd.references-view.copyCallHierarchyShort": "Short Style",
"cmd.references-view.copyCallHierarchyReversed": "Reversed Style",
"cmd.references-view.copyCallHierarchyReversedShort": "Reversed & Short Style",
"cmd.references-view.next": "Go to Next Reference",
"cmd.references-view.prev": "Go to Previous Reference",
"cmd.references-view.showTypeHierarchy": "Show Type Hierarchy",
Expand Down

0 comments on commit 350c5c3

Please sign in to comment.