Read syntax tree, source text and options synchronously in command handlers#62002
Read syntax tree, source text and options synchronously in command handlers#62002tmat merged 14 commits intodotnet:mainfrom
Conversation
src/EditorFeatures/CSharp/ConvertNamespace/ConvertNamespaceCommandHandler.cs
Show resolved
Hide resolved
src/EditorFeatures/CSharp/Formatting/CSharpFormattingInteractionService.cs
Show resolved
Hide resolved
src/EditorFeatures/CSharp/RawStringLiteral/RawStringLiteralCommandHandler_Return.cs
Show resolved
Hide resolved
src/EditorFeatures/CSharp/SplitStringLiteral/SplitStringLiteralCommandHandler.cs
Outdated
Show resolved
Hide resolved
...orFeatures/Core/AutomaticCompletion/BraceCompletionSessionProvider.BraceCompletionSession.cs
Show resolved
Hide resolved
...orFeatures/Core/AutomaticCompletion/BraceCompletionSessionProvider.BraceCompletionSession.cs
Show resolved
Hide resolved
src/EditorFeatures/Core/Formatting/FormatCommandHandler.Paste.cs
Outdated
Show resolved
Hide resolved
src/Features/CSharp/Portable/BraceCompletion/AbstractCurlyBraceOrBracketCompletionService.cs
Show resolved
Hide resolved
...CSharp/Portable/ConvertToRawString/ConvertRegularStringToRawStringCodeRefactoringProvider.cs
Show resolved
Hide resolved
...CSharp/Portable/ConvertToRawString/ConvertRegularStringToRawStringCodeRefactoringProvider.cs
Show resolved
Hide resolved
src/Features/CSharp/Portable/SplitStringLiteral/SimpleStringSplitter.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/BraceCompletion/AbstractBraceCompletionService.cs
Show resolved
Hide resolved
src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Utilities/ParsedDocument.cs
Outdated
Show resolved
Hide resolved
|
@CyrusNajmabadi A few more commits were needed after your review, starting with d18018d, but most significantly this one: b360f4e |
|
@jasonmalinowski Might be interested in reviewing this PR. |
|
I'm having a hard time seeing the value on this PR. The summary mentions two issues:
I'm concerned that the primary outcome of this change will be someone eventually comes back and manually reverts it (moves everything back to async forms). |
|
@sharwell Forgot to mention in the description/linked issue (updated) that we also have telemetry from the editor team on UI delays occurring during execution of our command handlers. This change is potentially addressing those delays, or at least reducing them to a single cause - which would be that parsing of a source text is slow.
The async backfill for completion is a great idea and it is gonna be needed when we need to access semantic information. It is not needed for indentation, formatting or brace completion, which is what this PR is addressing. |
|
Added comment on |
…ly in command handlers (dotnet#62002)" (dotnet#62189)" This reverts commit 791de28.
Use
ParsedDocumentand read options fromIEditorOptions.Use
IIndentationManagerServiceto read line formatting options in all command handlers that use formatting/indentation options. Previously only some handlers did so.Contributes to #57554
Fixes #61935