This commit is contained in:
Matt Parker
2025-10-22 22:30:30 +10:00
parent 64b186d6ff
commit 2097d1a51a
2 changed files with 2 additions and 3 deletions

View File

@@ -484,8 +484,7 @@ public class RoslynAnalysis
{
using var _ = SharpIdeOtel.Source.StartActivity($"{nameof(RoslynAnalysis)}.{nameof(GetCodeCompletionsForDocumentAtPosition)}");
await _solutionLoadedTcs.Task;
var project = _workspace!.CurrentSolution.Projects.Single(s => s.FilePath == ((IChildSharpIdeNode)fileModel).GetNearestProjectNode()!.FilePath);
var document = project.Documents.Single(s => s.FilePath == fileModel.Path);
var document = await GetDocumentForSharpIdeFile(fileModel);
Guard.Against.Null(document, nameof(document));
var completions = await GetCompletionsAsync(document, linePosition).ConfigureAwait(false);
return completions;

View File

@@ -166,7 +166,7 @@ public partial class IdeRoot : Control
var selectedFile = filesToOpen.SingleOrDefault(f => f.IsSelected);
if (selectedFile.Item1 is not null) await GodotGlobalEvents.Instance.FileExternallySelected.InvokeParallelAsync(selectedFile.Item1, selectedFile.Item2);
});
var tasks = solutionModel.AllProjects.Select(p => p.MsBuildEvaluationProjectTask).ToList();
await Task.WhenAll(tasks).ConfigureAwait(false);
var runnableProjects = solutionModel.AllProjects.Where(p => p.IsRunnable).ToList();