-
Notifications
You must be signed in to change notification settings - Fork 200
"Show in AST viewer" command #707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmmm...it should be the case that you can invoke "CodeQL: View AST" from the command palette (if the active editor is in a source archive) or from the file explorer by right clicking on a file in a source archive. Is this not working for you? It would be a nice feature to automatically select the AST node corresponding to the current position of the caret. The first part is potentially a bug and the second part is a feature enhancement. |
Huh, somehow I didn't realise I could use the command palette to trigger AST view on the current file, and that it would replace any currently displayed AST -- my workflow was around clicking the 'show AST' button in the viewer pane, preceded, if necessary, by a click on 'clear AST' in order to make the button visible again. I definitely do not have that option in my right-click context menu, and if it had been there I probably would have discovered it. Running the command manually (and then clicking to focus on an element's location) is actually enough to unblock me here. |
I right-click in the actual source-code view, and I don't see it there. |
Ah...yes. That's not implemented. It might be something easy to do. And if so, I'll slip it in right before the next release. |
Is your feature request related to a problem? Please describe.
I'd like an easy way to view the AST of a particular construct. One workflow I keep trying is right-clicking in a source archive file, and looking for a "show in AST viewer" option.
Describe the solution you'd like
A new command for showing the current file in the AST viewer (if it isn't already there) and navigating to the node whose location is at the cursor.
Describe alternatives you've considered
The current workaround is to navigate to the AST viewer pane, clear the current AST, show the AST for the current file, and then click once more on the construct I want the tree view to navigate to. This could be condensed into a single command invocation.
The text was updated successfully, but these errors were encountered: