Skip to content

Commit 141f538

Browse files
committed
MRVA: Export results from query history
1 parent be054ca commit 141f538

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

extensions/ql-vscode/package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,10 @@
541541
"command": "codeQLQueryHistory.showQueryText",
542542
"title": "Show Query Text"
543543
},
544+
{
545+
"command": "codeQLQueryHistory.exportResults",
546+
"title": "Export Results"
547+
},
544548
{
545549
"command": "codeQLQueryHistory.viewCsvResults",
546550
"title": "View Results (CSV)"
@@ -751,6 +755,11 @@
751755
"group": "9_qlCommands",
752756
"when": "view == codeQLQueryHistory"
753757
},
758+
{
759+
"command": "codeQLQueryHistory.exportResults",
760+
"group": "9_qlCommands",
761+
"when": "view == codeQLQueryHistory && viewItem == remoteResultsItem"
762+
},
754763
{
755764
"command": "codeQLQueryHistory.viewCsvResults",
756765
"group": "9_qlCommands",
@@ -973,6 +982,10 @@
973982
"command": "codeQLQueryHistory.showQueryText",
974983
"when": "false"
975984
},
985+
{
986+
"command": "codeQLQueryHistory.exportResults",
987+
"when": "false"
988+
},
976989
{
977990
"command": "codeQLQueryHistory.viewCsvResults",
978991
"when": "false"

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,12 @@ export class QueryHistoryManager extends DisposableObject {
450450
this.handleShowQueryText.bind(this)
451451
)
452452
);
453+
this.push(
454+
commandRunner(
455+
'codeQLQueryHistory.exportResults',
456+
this.handleExportResults.bind(this)
457+
)
458+
);
453459
this.push(
454460
commandRunner(
455461
'codeQLQueryHistory.viewCsvResults',
@@ -991,6 +997,10 @@ export class QueryHistoryManager extends DisposableObject {
991997
: item.remoteQuery.queryText;
992998
}
993999

1000+
async handleExportResults(): Promise<void> {
1001+
await commands.executeCommand('codeQL.exportVariantAnalysisResults');
1002+
}
1003+
9941004
addQuery(item: QueryHistoryInfo) {
9951005
this.treeDataProvider.pushQuery(item);
9961006
this.updateTreeViewSelectionIfVisible();

0 commit comments

Comments
 (0)