Add a new blank "queries" panel (#2412)

This commit is contained in:
Shati Patel
2023-05-10 13:23:43 +01:00
committed by GitHub
parent 00f4bc1fda
commit 7fd984a7d0
2 changed files with 15 additions and 0 deletions

View File

@@ -36,6 +36,7 @@
"activationEvents": [
"onLanguage:ql",
"onLanguage:ql-summary",
"onView:codeQLQueries",
"onView:codeQLDatabases",
"onView:codeQLVariantAnalysisRepositories",
"onView:codeQLQueryHistory",
@@ -1555,6 +1556,11 @@
},
"views": {
"ql-container": [
{
"id": "codeQLQueries",
"name": "Queries",
"when": "config.codeQL.canary && config.codeQL.queriesPanel"
},
{
"id": "codeQLDatabases",
"name": "Databases"

View File

@@ -702,3 +702,12 @@ export function getAutogenerateQlPacks(): AutogenerateQLPacks {
export async function setAutogenerateQlPacks(choice: AutogenerateQLPacks) {
await AUTOGENERATE_QL_PACKS.updateValue(choice, ConfigurationTarget.Global);
}
/**
* A flag indicating whether to show the queries panel in the QL view container.
*/
const QUERIES_PANEL = new Setting("queriesPanel", ROOT_SETTING);
export function showQueriesPanel(): boolean {
return !!QUERIES_PANEL.getValue<boolean>();
}