This commit is contained in:
Nora
2023-06-20 15:01:40 +00:00
parent 971d1461c8
commit fea0c3ce46
2 changed files with 19 additions and 4 deletions

View File

@@ -501,6 +501,11 @@
"command": "codeQL.copyVersion",
"title": "CodeQL: Copy Version Information"
},
{
"command": "codeQLQueries.runLocalQueryContextInline",
"title": "Run local query",
"icon": "$(run)"
},
{
"command": "codeQLVariantAnalysisRepositories.openConfigFile",
"title": "Open database configuration file",
@@ -1095,6 +1100,11 @@
"group": "1_queryHistory@1",
"when": "viewItem == remoteResultsItem"
},
{
"command": "codeQLQueries.runLocalQueryContextInline",
"group": "inline",
"when": "view == codeQLQueries && viewItem == queryFile"
},
{
"command": "codeQLTests.showOutputDifferences",
"group": "qltest@1",
@@ -1274,6 +1284,10 @@
"command": "codeQL.openDataExtensionsEditor",
"when": "config.codeQL.canary && config.codeQL.dataExtensions.editor"
},
{
"command": "codeQLQueries.runLocalQueryContextInline",
"when": "false"
},
{
"command": "codeQLVariantAnalysisRepositories.openConfigFile",
"when": "false"

View File

@@ -9,16 +9,17 @@ export class QueryTreeViewItem extends vscode.TreeItem {
) {
super(name);
this.tooltip = path;
this.description = language;
this.collapsibleState = this.children.length
? vscode.TreeItemCollapsibleState.Collapsed
: vscode.TreeItemCollapsibleState.None;
if (this.children.length === 0) {
this.description = language;
this.collapsibleState = vscode.TreeItemCollapsibleState.None;
this.contextValue = "queryFile";
this.command = {
title: "Open",
command: "vscode.open",
arguments: [vscode.Uri.file(path)],
};
} else {
this.collapsibleState = vscode.TreeItemCollapsibleState.Collapsed;
}
}
}