run panel tabs

This commit is contained in:
Matt Parker
2025-08-25 18:42:46 +10:00
parent 8826c31a63
commit feffc0d7a8
17 changed files with 163 additions and 30 deletions

View File

@@ -34,7 +34,7 @@ public class DebuggingService
var debugProtocolHost = new DebugProtocolHost(process.StandardInput.BaseStream, process.StandardOutput.BaseStream, false);
debugProtocolHost.LogMessage += (sender, args) =>
{
Console.WriteLine($"Log message: {args.Message}");
//Console.WriteLine($"Log message: {args.Message}");
};
debugProtocolHost.EventReceived += (sender, args) =>
{

View File

@@ -1,4 +1,6 @@
namespace SharpIDE.Application.Features.Events;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
namespace SharpIDE.Application.Features.Events;
public static class GlobalEvents
{
@@ -7,4 +9,10 @@ public static class GlobalEvents
public static event Func<Task> StartedRunningProject = () => Task.CompletedTask;
public static void InvokeStartedRunningProject() => StartedRunningProject?.Invoke();
public static event Func<SharpIdeProjectModel, Task> ProjectStartedRunning = _ => Task.CompletedTask;
public static void InvokeProjectStartedRunning(SharpIdeProjectModel project) => ProjectStartedRunning?.Invoke(project);
public static event Func<SharpIdeProjectModel, Task> ProjectStoppedRunning = _ => Task.CompletedTask;
public static void InvokeProjectStoppedRunning(SharpIdeProjectModel project) => ProjectStoppedRunning?.Invoke(project);
}

View File

@@ -89,6 +89,7 @@ public class RunService
project.OpenInRunPanel = true;
GlobalEvents.InvokeProjectsRunningChanged();
GlobalEvents.InvokeStartedRunningProject();
GlobalEvents.InvokeProjectStartedRunning(project);
project.InvokeProjectStartedRunning();
await process.WaitForExitAsync().WaitAsync(project.RunningCancellationTokenSource.Token).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
if (project.RunningCancellationTokenSource.IsCancellationRequested)
@@ -118,6 +119,7 @@ public class RunService
if (project.RunningCancellationTokenSource is null) throw new InvalidOperationException($"Project {project.Name} does not have a running cancellation token source.");
await project.RunningCancellationTokenSource.CancelAsync().ConfigureAwait(false);
GlobalEvents.InvokeProjectStoppedRunning(project);
}
private string GetRunArguments(SharpIdeProjectModel project)