Merge pull request #2178 from github/robertbrignull/split-commands/codeQLQueryHistory.openQuery

Split up codeQLQueryHistory.openQuery command
This commit is contained in:
Robert
2023-03-15 17:12:06 +00:00
committed by GitHub
2 changed files with 20 additions and 5 deletions

View File

@@ -544,7 +544,12 @@
"title": "CodeQL: Check for CLI Updates"
},
{
"command": "codeQLQueryHistory.openQuery",
"command": "codeQLQueryHistory.openQueryTitleMenu",
"title": "View Query",
"icon": "$(edit)"
},
{
"command": "codeQLQueryHistory.openQueryContextMenu",
"title": "View Query",
"icon": "$(edit)"
},
@@ -751,7 +756,7 @@
"group": "navigation"
},
{
"command": "codeQLQueryHistory.openQuery",
"command": "codeQLQueryHistory.openQueryTitleMenu",
"when": "view == codeQLQueryHistory",
"group": "navigation"
},
@@ -858,7 +863,7 @@
"group": "inline"
},
{
"command": "codeQLQueryHistory.openQuery",
"command": "codeQLQueryHistory.openQueryContextMenu",
"group": "2_queryHistory@0",
"when": "view == codeQLQueryHistory"
},
@@ -1165,7 +1170,11 @@
"when": "false"
},
{
"command": "codeQLQueryHistory.openQuery",
"command": "codeQLQueryHistory.openQueryTitleMenu",
"when": "false"
},
{
"command": "codeQLQueryHistory.openQueryContextMenu",
"when": "false"
},
{

View File

@@ -204,7 +204,13 @@ export class QueryHistoryManager extends DisposableObject {
void extLogger.log("Registering query history panel commands.");
this.push(
commandRunner(
"codeQLQueryHistory.openQuery",
"codeQLQueryHistory.openQueryTitleMenu",
this.handleOpenQuery.bind(this),
),
);
this.push(
commandRunner(
"codeQLQueryHistory.openQueryContextMenu",
this.handleOpenQuery.bind(this),
),
);