Skip to content

Method workspace identifier auto-completion can be more scope aware#1215

Merged
blairmcg merged 2 commits into
masterfrom
blairmcg/workspaceautocomplete
Dec 17, 2023
Merged

Method workspace identifier auto-completion can be more scope aware#1215
blairmcg merged 2 commits into
masterfrom
blairmcg/workspaceautocomplete

Conversation

@blairmcg

Copy link
Copy Markdown
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.
@blairmcg blairmcg merged commit 2a9ad87 into master Dec 17, 2023
@blairmcg blairmcg deleted the blairmcg/workspaceautocomplete branch December 17, 2023 11:56
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.

1 participant