pass cancellation tokens

This commit is contained in:
Matt Parker
2025-10-22 18:50:10 +10:00
parent 37fdfa7df2
commit d1fb9f5a43
2 changed files with 2 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ public class RoslynAnalysis
// _codeRefactoringProviders.AddRange(refactoringProviders); // _codeRefactoringProviders.AddRange(refactoringProviders);
// } // }
await UpdateSolutionDiagnostics(); await UpdateSolutionDiagnostics(cancellationToken);
// foreach (var project in solution.Projects) // foreach (var project in solution.Projects)
// { // {
// // foreach (var document in project.Documents) // // foreach (var document in project.Documents)
@@ -495,7 +495,7 @@ public class RoslynAnalysis
{ {
using var _ = SharpIdeOtel.Source.StartActivity($"{nameof(RoslynAnalysis)}.{nameof(GetCodeFixesForDocumentAtPosition)}"); using var _ = SharpIdeOtel.Source.StartActivity($"{nameof(RoslynAnalysis)}.{nameof(GetCodeFixesForDocumentAtPosition)}");
await _solutionLoadedTcs.Task; await _solutionLoadedTcs.Task;
var document = await GetDocumentForSharpIdeFile(fileModel); var document = await GetDocumentForSharpIdeFile(fileModel, cancellationToken);
Guard.Against.Null(document, nameof(document)); Guard.Against.Null(document, nameof(document));
var semanticModel = await document.GetSemanticModelAsync(cancellationToken); var semanticModel = await document.GetSemanticModelAsync(cancellationToken);
Guard.Against.Null(semanticModel, nameof(semanticModel)); Guard.Against.Null(semanticModel, nameof(semanticModel));

View File

@@ -502,7 +502,6 @@ public partial class SharpIdeCodeEdit : CodeEdit
public override void _ConfirmCodeCompletion(bool replace) public override void _ConfirmCodeCompletion(bool replace)
{ {
GD.Print("Code completion confirmed");
var selectedIndex = GetCodeCompletionSelectedIndex(); var selectedIndex = GetCodeCompletionSelectedIndex();
var selectedText = GetCodeCompletionOption(selectedIndex); var selectedText = GetCodeCompletionOption(selectedIndex);
if (selectedText is null) return; if (selectedText is null) return;