Method workspace identifier auto-completion can be more scope aware#1215
Merged
Conversation
blairmcg
commented
Dec 17, 2023
Contributor
- When assembling the list of identifiers we visit the scopes to find all the declared args and temps. This should take account of the scope at the insertion point and not add locals defined for other blocks in the method.
- Environment Browser should only include static variables that are part of the environment so that, for example, when browsing the content of a deployed application if editing takes place the auto-completion offerings are scoped to the classes/variables that survived into the app. Previous work limited the message completion lists to messages defined in the app.
I'm going to make the base semantic analyser concrete, as a fast analyser for variable binding only, to help with improving auto-completion of identifiers and various other context sensitive operations initiated from a method workspace. Currently the full semantic analyser is run only by the background parsing operation that runs intermittently and relatively irregularly so as not to interfere with typing. Methods are parsed for identifier auto-completion anyway, and we might as well run the fast analysis necessary to map identifiers to variables. This will allow the identifier auto-completion to offer only those variables in scope, not all locals defined in a method. Other context sensitive commands such as browsing references/definitions also work better when the variable analysis has been done.
- When assembling the list of identifiers we visit the scopes to find all the declared args and temps. This should take account of the scope at the insertion point and not add locals defined for other blocks in the method. - Environment Browser should only include static variables that are part of the environment so that, for example, when browsing the content of a deployed application if editing takes place the auto-completion offerings are scoped to the classes/variables that survived into the app. Previous work limited the message completion lists to messages defined in the app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.