Add open type support from AST Viewer #617
Closed
+173
−106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
@github/docs-content-dsp
has been cc'd in all issues for UI or other user-facing changes made by this pull request.