File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 493493 "command" : " codeQLQueryHistory.showQueryText" ,
494494 "when" : " false"
495495 },
496+ {
497+ "command" : " codeQLQueryHistory.viewSarif" ,
498+ "when" : " false"
499+ },
496500 {
497501 "command" : " codeQLQueryHistory.setLabel" ,
498502 "when" : " false"
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class HistoryTreeDataProvider implements vscode.TreeDataProvider<CompletedQuery>
7474 constructor ( private ctx : ExtensionContext ) {
7575 }
7676
77- getTreeItem ( element : CompletedQuery ) : vscode . TreeItem {
77+ async getTreeItem ( element : CompletedQuery ) : Promise < vscode . TreeItem > {
7878 const it = new vscode . TreeItem ( element . toString ( ) ) ;
7979
8080 it . command = {
@@ -86,7 +86,7 @@ class HistoryTreeDataProvider implements vscode.TreeDataProvider<CompletedQuery>
8686 // Mark this query history item according to whether it has a
8787 // SARIF file so that we can make context menu items conditionally
8888 // available.
89- it . contextValue = element . query . hasInterpretedResults ( ) ? 'interpretedResultsItem' : 'rawResultsItem' ;
89+ it . contextValue = await element . query . hasInterpretedResults ( ) ? 'interpretedResultsItem' : 'rawResultsItem' ;
9090
9191 if ( ! element . didRunSuccessfully ) {
9292 it . iconPath = path . join ( this . ctx . extensionPath , FAILED_QUERY_HISTORY_ITEM_ICON ) ;
Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ export class QueryInfo {
170170 /**
171171 * Holds if this query actually has produced interpreted results.
172172 */
173- hasInterpretedResults ( ) : boolean {
174- return fs . existsSync ( this . resultsPaths . interpretedResultsPath ) ;
173+ async hasInterpretedResults ( ) : Promise < boolean > {
174+ return fs . pathExists ( this . resultsPaths . interpretedResultsPath ) ;
175175 }
176176}
177177
You can’t perform that action at this time.
0 commit comments