Add feature flag for ast viewer
Set `codeQL.experimentalAstViewer` to true in settings in order for component to be enabled.
This commit is contained in:
@@ -387,7 +387,7 @@
|
||||
},
|
||||
{
|
||||
"command": "codeQLAstViewer.clear",
|
||||
"when": "view == codeQLAstViewer",
|
||||
"when": "view == codeQLAstViewer && config.codeQL.experimentalAstViewer == true",
|
||||
"group": "navigation"
|
||||
}
|
||||
],
|
||||
@@ -472,7 +472,7 @@
|
||||
{
|
||||
"command": "codeQL.viewAst",
|
||||
"group": "9_qlCommands",
|
||||
"when": "resourceScheme == codeql-zip-archive"
|
||||
"when": "resourceScheme == codeql-zip-archive && config.codeQL.experimentalAstViewer == true"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.runQueries",
|
||||
@@ -617,14 +617,16 @@
|
||||
},
|
||||
{
|
||||
"id": "codeQLAstViewer",
|
||||
"name": "AST Viewer"
|
||||
"name": "AST Viewer",
|
||||
"when": "config.codeQL.experimentalAstViewer == true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"viewsWelcome": [
|
||||
{
|
||||
"view": "codeQLAstViewer",
|
||||
"contents": "Run the 'CodeQL: View AST' command on an open source file from a Code QL database.\n[View AST](command:codeQL.viewAst)"
|
||||
"contents": "Run the 'CodeQL: View AST' command on an open source file from a Code QL database.\n[View AST](command:codeQL.viewAst)",
|
||||
"when": "config.codeQL.experimentalAstViewer == true"
|
||||
},
|
||||
{
|
||||
"view": "codeQLQueryHistory",
|
||||
|
||||
@@ -209,3 +209,15 @@ export class QueryHistoryConfigListener extends ConfigListener implements QueryH
|
||||
return QUERY_HISTORY_FORMAT_SETTING.getValue<string>();
|
||||
}
|
||||
}
|
||||
|
||||
// Enable experimental features
|
||||
|
||||
/**
|
||||
* Any settings below are deliberately not in package.json so that
|
||||
* they do not appear in the settings ui in vscode itself. If users
|
||||
* want to enable experimental features, they can add them directly in
|
||||
* their vscode settings json file.
|
||||
*/
|
||||
|
||||
/* Advanced setting: used to enable the AST Viewer. */
|
||||
export const EXPERIMENTAL_AST_VIEWER = new Setting('experimentalAstViewer', ROOT_SETTING);
|
||||
|
||||
Reference in New Issue
Block a user