Skip to content

Commit fea0c3c

Browse files
committed
Add icon
1 parent 971d146 commit fea0c3c

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

extensions/ql-vscode/package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,11 @@
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",
@@ -1095,6 +1100,11 @@
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",
@@ -1274,6 +1284,10 @@
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"

extensions/ql-vscode/src/queries-panel/query-tree-view-item.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)