File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 501501 "command" : " codeQL.copyVersion" ,
502502 "title" : " CodeQL: Copy Version Information"
503503 },
504+ {
505+ "command" : " codeQLQueries.runLocalQueryContextInline" ,
506+ "title" : " Run local query" ,
507+ "icon" : " $(run)"
508+ },
504509 {
505510 "command" : " codeQLVariantAnalysisRepositories.openConfigFile" ,
506511 "title" : " Open database configuration file" ,
10951100 "group" : " 1_queryHistory@1" ,
10961101 "when" : " viewItem == remoteResultsItem"
10971102 },
1103+ {
1104+ "command" : " codeQLQueries.runLocalQueryContextInline" ,
1105+ "group" : " inline" ,
1106+ "when" : " view == codeQLQueries && viewItem == queryFile"
1107+ },
10981108 {
10991109 "command" : " codeQLTests.showOutputDifferences" ,
11001110 "group" : " qltest@1" ,
12741284 "command" : " codeQL.openDataExtensionsEditor" ,
12751285 "when" : " config.codeQL.canary && config.codeQL.dataExtensions.editor"
12761286 },
1287+ {
1288+ "command" : " codeQLQueries.runLocalQueryContextInline" ,
1289+ "when" : " false"
1290+ },
12771291 {
12781292 "command" : " codeQLVariantAnalysisRepositories.openConfigFile" ,
12791293 "when" : " false"
Original file line number Diff line number Diff line change @@ -9,16 +9,17 @@ export class QueryTreeViewItem extends vscode.TreeItem {
99 ) {
1010 super ( name ) ;
1111 this . tooltip = path ;
12- this . description = language ;
13- this . collapsibleState = this . children . length
14- ? vscode . TreeItemCollapsibleState . Collapsed
15- : vscode . TreeItemCollapsibleState . None ;
1612 if ( this . children . length === 0 ) {
13+ this . description = language ;
14+ this . collapsibleState = vscode . TreeItemCollapsibleState . None ;
15+ this . contextValue = "queryFile" ;
1716 this . command = {
1817 title : "Open" ,
1918 command : "vscode.open" ,
2019 arguments : [ vscode . Uri . file ( path ) ] ,
2120 } ;
21+ } else {
22+ this . collapsibleState = vscode . TreeItemCollapsibleState . Collapsed ;
2223 }
2324 }
2425}
You can’t perform that action at this time.
0 commit comments