Skip to content

Commit 7fd984a

Browse files
authored
Add a new blank "queries" panel (#2412)
1 parent 00f4bc1 commit 7fd984a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

extensions/ql-vscode/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"activationEvents": [
3737
"onLanguage:ql",
3838
"onLanguage:ql-summary",
39+
"onView:codeQLQueries",
3940
"onView:codeQLDatabases",
4041
"onView:codeQLVariantAnalysisRepositories",
4142
"onView:codeQLQueryHistory",
@@ -1555,6 +1556,11 @@
15551556
},
15561557
"views": {
15571558
"ql-container": [
1559+
{
1560+
"id": "codeQLQueries",
1561+
"name": "Queries",
1562+
"when": "config.codeQL.canary && config.codeQL.queriesPanel"
1563+
},
15581564
{
15591565
"id": "codeQLDatabases",
15601566
"name": "Databases"

extensions/ql-vscode/src/config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,3 +702,12 @@ export function getAutogenerateQlPacks(): AutogenerateQLPacks {
702702
export async function setAutogenerateQlPacks(choice: AutogenerateQLPacks) {
703703
await AUTOGENERATE_QL_PACKS.updateValue(choice, ConfigurationTarget.Global);
704704
}
705+
706+
/**
707+
* A flag indicating whether to show the queries panel in the QL view container.
708+
*/
709+
const QUERIES_PANEL = new Setting("queriesPanel", ROOT_SETTING);
710+
711+
export function showQueriesPanel(): boolean {
712+
return !!QUERIES_PANEL.getValue<boolean>();
713+
}

0 commit comments

Comments
 (0)