Skip to content

Add open type support from AST Viewer #617

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

Closed
wants to merge 1 commit into from

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Oct 14, 2020

Note This is still a draft. The UX here is off. When you invoke the Open AST Type command, you are navigated to the search bar and you lose your place in the AST Viewer. I'm not a fan of this. However, it might be the case that even with this poor UX, we are better served having the feature than not.

We make the assumption that AST items whose label start with a bracketed
name refer to a Code QL AST type.

We would like to use the language server's open type command, but that
requires a file URI and a text location in that file.

Instead, we use a file search. This is an experimental feature. Let's
see if it is useful.

Fixes #614. This is an alternative implementation that gets us part-way to the desired goal and maybe it is sufficient for now.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • @github/docs-content-dsp has been cc'd in all issues for UI or other user-facing changes made by this pull request.

Sorry, something went wrong.

We make the assumption that AST items whose label start with a bracketed 
name refer to a Code QL AST type.

We would like to use the language server's open type command, but that 
requires a file URI and a text location in that file.

Instead, we use a file search. This is an experimental feature. Let's 
see if it is useful.
@aeisenberg aeisenberg marked this pull request as draft October 14, 2020 22:39
@aeisenberg
Copy link
Contributor Author

This approach is not going to work. Closing this off until we get a better idea. Likely we are going to have to update the Query server to get this working.

@aeisenberg aeisenberg closed this Oct 30, 2020
@aeisenberg aeisenberg deleted the aeisenberg/ast-open-type branch November 24, 2020 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add command to open AST node type declaration in AST Viewer
1 participant