set projects stub
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Godot;
|
||||
using SharpIDE.Application.Features.Nuget;
|
||||
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
|
||||
|
||||
namespace SharpIDE.Godot.Features.Nuget;
|
||||
|
||||
@@ -51,6 +52,11 @@ public partial class NugetPackageDetails : VBoxContainer
|
||||
OnNugetSourceSelected(0);
|
||||
});
|
||||
}
|
||||
|
||||
public async Task SetProjects(HashSet<SharpIdeProjectModel> projects)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private async void OnNugetSourceSelected(long sourceIndex)
|
||||
{
|
||||
|
||||
@@ -73,6 +73,7 @@ public partial class NugetPanel : Control
|
||||
{
|
||||
if (_solution is null) throw new InvalidOperationException("Solution is null but should not be");
|
||||
_ = Task.GodotRun(() => SetSolutionOrProjectNameLabels(slnOrProject));
|
||||
_ = Task.GodotRun(() => SetDetailsProjects(slnOrProject));
|
||||
_ = Task.GodotRun(PopulateSearchResults);
|
||||
_ = Task.GodotRun(PopulateInstalledPackages);
|
||||
});
|
||||
@@ -84,6 +85,17 @@ public partial class NugetPanel : Control
|
||||
await _nugetPackageDetails.SetPackage(packageResult);
|
||||
}
|
||||
|
||||
private async Task SetDetailsProjects(ISolutionOrProject slnOrProject)
|
||||
{
|
||||
var projects = slnOrProject switch
|
||||
{
|
||||
SharpIdeSolutionModel solutionModel => solutionModel.AllProjects,
|
||||
SharpIdeProjectModel projectModel => [projectModel],
|
||||
_ => throw new InvalidOperationException("Unknown solution or project type")
|
||||
};
|
||||
await _nugetPackageDetails.SetProjects(projects);
|
||||
}
|
||||
|
||||
private async Task SetSolutionOrProjectNameLabels(ISolutionOrProject slnOrProject)
|
||||
{
|
||||
var text = slnOrProject switch
|
||||
|
||||
Reference in New Issue
Block a user