open file from problem

This commit is contained in:
Matt Parker
2025-09-13 15:35:52 +10:00
parent 3fb602d8fc
commit b4291cb7f7
6 changed files with 51 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
using Godot;
using Microsoft.Build.Locator;
using SharpIDE.Application.Features.Analysis;
using SharpIDE.Application.Features.SolutionDiscovery;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
using SharpIDE.Godot.Features.BottomPanel;
using SharpIDE.Godot.Features.CustomControls;
@@ -39,7 +40,7 @@ public partial class IdeRoot : Control
_bottomPanelManager = GetNode<BottomPanelManager>("%BottomPanel");
_runMenuButton.Pressed += OnRunMenuButtonPressed;
_solutionExplorerPanel.FileSelected += OnSolutionExplorerPanelOnFileSelected;
GodotGlobalEvents.FileSelected += OnSolutionExplorerPanelOnFileSelected;
_fileDialog.FileSelected += OnFileSelected;
_openSlnButton.Pressed += () => _fileDialog.Visible = true;
_buildSlnButton.Pressed += OnBuildSlnButtonPressed;
@@ -61,9 +62,9 @@ public partial class IdeRoot : Control
await Singletons.BuildService.MsBuildSolutionAsync(_solutionExplorerPanel.SolutionModel.FilePath);
}
private async void OnSolutionExplorerPanelOnFileSelected(SharpIdeFileGodotContainer file)
private async Task OnSolutionExplorerPanelOnFileSelected(SharpIdeFile file)
{
await _sharpIdeCodeEdit.SetSharpIdeFile(file.File);
await _sharpIdeCodeEdit.SetSharpIdeFile(file);
}
private void OnFileSelected(string path)