Skip to content

Merge features/argument-completion to main#51960

Merged
sharwell merged 50 commits intomainfrom
features/argument-completion
Mar 19, 2021
Merged

Merge features/argument-completion to main#51960
sharwell merged 50 commits intomainfrom
features/argument-completion

Conversation

@sharwell
Copy link
Contributor

No description provided.

This issue was introduced by #50552 and caused signature help to
misbehave while typing.
sharwell and others added 20 commits February 25, 2021 17:12
…tion-branch

Merge main into featuers/argument-completion
Merge main into features/argument-completion
Since we're only using this in snippets we generate ourselves, we can
just compute the value directly and insert that into the Snippet XML.
This takes advantage of the prior commit to simplify some state
management. When we were using snippet functions to populate each
parameter, it was necessary to ensure some state "survives" when we are
moving from one overload to the next. This is because there's some
reentrancy: the process of moving to a new overload would dismiss the
prior snippet, but it had to still be avialable before the call to
insert the new snippet returned. Now that the snippet is fully
pre-generated, that's not a requirement anymore; instead we can just
always clear state when one snippet is dismissed, and set it afterwards
again once the snippet is re-inserted. This removes the necessity of
having the "_preserveSymbols" flag, as well as removing the requirement
to call specific Clear() at various points when we were dismissing
sessions.

The other simplification is the list of methods that was stored once a
session began was only used to grab one thing: the name of the method
group. So just replace that with a string.
If the first overload displayed by signature help is a method with no
parameters, then we have a placeholder snippet field. If you type in
that snippet field, we would switch the active overload to something
else which would cause what you typed to disappear.
As long as an edit happens in the middle, the two methods can come from
different Compilations. If the methods are in source, they don't compare
the same.
Since we create snippets out of XML, ensure we don't mangle parameters
if they round-trip in some way.
Only update snippet model on explicit selection
@sharwell sharwell requested a review from a team as a code owner March 18, 2021 17:46
@sharwell sharwell requested a review from a team March 18, 2021 17:46
@ghost ghost added the Area-IDE label Mar 18, 2021
@dotnet dotnet deleted a comment from azure-pipelines bot Mar 18, 2021
@sharwell sharwell merged commit a876a4b into main Mar 19, 2021
@sharwell sharwell deleted the features/argument-completion branch March 19, 2021 01:46
@ghost ghost added this to the Next milestone Mar 19, 2021
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants