Skip to content

Commit 9045253

Browse files
Merge pull request #2178 from github/robertbrignull/split-commands/codeQLQueryHistory.openQuery
Split up codeQLQueryHistory.openQuery command
2 parents 04c24d0 + e6f5436 commit 9045253

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

extensions/ql-vscode/package.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,12 @@
544544
"title": "CodeQL: Check for CLI Updates"
545545
},
546546
{
547-
"command": "codeQLQueryHistory.openQuery",
547+
"command": "codeQLQueryHistory.openQueryTitleMenu",
548+
"title": "View Query",
549+
"icon": "$(edit)"
550+
},
551+
{
552+
"command": "codeQLQueryHistory.openQueryContextMenu",
548553
"title": "View Query",
549554
"icon": "$(edit)"
550555
},
@@ -751,7 +756,7 @@
751756
"group": "navigation"
752757
},
753758
{
754-
"command": "codeQLQueryHistory.openQuery",
759+
"command": "codeQLQueryHistory.openQueryTitleMenu",
755760
"when": "view == codeQLQueryHistory",
756761
"group": "navigation"
757762
},
@@ -858,7 +863,7 @@
858863
"group": "inline"
859864
},
860865
{
861-
"command": "codeQLQueryHistory.openQuery",
866+
"command": "codeQLQueryHistory.openQueryContextMenu",
862867
"group": "2_queryHistory@0",
863868
"when": "view == codeQLQueryHistory"
864869
},
@@ -1165,7 +1170,11 @@
11651170
"when": "false"
11661171
},
11671172
{
1168-
"command": "codeQLQueryHistory.openQuery",
1173+
"command": "codeQLQueryHistory.openQueryTitleMenu",
1174+
"when": "false"
1175+
},
1176+
{
1177+
"command": "codeQLQueryHistory.openQueryContextMenu",
11691178
"when": "false"
11701179
},
11711180
{

extensions/ql-vscode/src/query-history/query-history-manager.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,13 @@ export class QueryHistoryManager extends DisposableObject {
204204
void extLogger.log("Registering query history panel commands.");
205205
this.push(
206206
commandRunner(
207-
"codeQLQueryHistory.openQuery",
207+
"codeQLQueryHistory.openQueryTitleMenu",
208+
this.handleOpenQuery.bind(this),
209+
),
210+
);
211+
this.push(
212+
commandRunner(
213+
"codeQLQueryHistory.openQueryContextMenu",
208214
this.handleOpenQuery.bind(this),
209215
),
210216
);

0 commit comments

Comments
 (0)