File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 387387 },
388388 {
389389 "command" : " codeQLAstViewer.clear" ,
390- "when" : " view == codeQLAstViewer" ,
390+ "when" : " view == codeQLAstViewer && config.codeQL.experimentalAstViewer == true " ,
391391 "group" : " navigation"
392392 }
393393 ],
472472 {
473473 "command" : " codeQL.viewAst" ,
474474 "group" : " 9_qlCommands" ,
475- "when" : " resourceScheme == codeql-zip-archive"
475+ "when" : " resourceScheme == codeql-zip-archive && config.codeQL.experimentalAstViewer == true "
476476 },
477477 {
478478 "command" : " codeQL.runQueries" ,
617617 },
618618 {
619619 "id" : " codeQLAstViewer" ,
620- "name" : " AST Viewer"
620+ "name" : " AST Viewer" ,
621+ "when" : " config.codeQL.experimentalAstViewer == true"
621622 }
622623 ]
623624 },
624625 "viewsWelcome" : [
625626 {
626627 "view" : " codeQLAstViewer" ,
627- "contents" : " Run the 'CodeQL: View AST' command on an open source file from a Code QL database.\n [View AST](command:codeQL.viewAst)"
628+ "contents" : " Run the 'CodeQL: View AST' command on an open source file from a Code QL database.\n [View AST](command:codeQL.viewAst)" ,
629+ "when" : " config.codeQL.experimentalAstViewer == true"
628630 },
629631 {
630632 "view" : " codeQLQueryHistory" ,
Original file line number Diff line number Diff line change @@ -209,3 +209,15 @@ export class QueryHistoryConfigListener extends ConfigListener implements QueryH
209209 return QUERY_HISTORY_FORMAT_SETTING . getValue < string > ( ) ;
210210 }
211211}
212+
213+ // Enable experimental features
214+
215+ /**
216+ * Any settings below are deliberately not in package.json so that
217+ * they do not appear in the settings ui in vscode itself. If users
218+ * want to enable experimental features, they can add them directly in
219+ * their vscode settings json file.
220+ */
221+
222+ /* Advanced setting: used to enable the AST Viewer. */
223+ export const EXPERIMENTAL_AST_VIEWER = new Setting ( 'experimentalAstViewer' , ROOT_SETTING ) ;
You can’t perform that action at this time.
0 commit comments