Add file system watcher v1

This commit is contained in:
Matt Parker
2025-10-08 00:18:13 +10:00
parent 80942c464b
commit f4356b7653
6 changed files with 118 additions and 11 deletions

View File

@@ -4,6 +4,8 @@ using Microsoft.Extensions.Hosting;
using SharpIDE.Application.Features.Analysis;
using SharpIDE.Application.Features.Build;
using SharpIDE.Application.Features.Events;
using SharpIDE.Application.Features.FileWatching;
using SharpIDE.Application.Features.Run;
using SharpIDE.Application.Features.SolutionDiscovery;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
using SharpIDE.Godot.Features.BottomPanel;
@@ -39,6 +41,10 @@ public partial class IdeRoot : Control
{
GodotGlobalEvents.Instance = new GodotGlobalEvents();
GlobalEvents.Instance = new GlobalEvents();
Singletons.RunService = new RunService();
Singletons.BuildService = new BuildService();
Singletons.FileWatcher?.Dispose();
Singletons.FileWatcher = new IdeFileWatcher();
}
public override void _Ready()

View File

@@ -1,4 +1,5 @@
using SharpIDE.Application.Features.Build;
using SharpIDE.Application.Features.FileWatching;
using SharpIDE.Application.Features.Run;
using SharpIDE.Godot.Features.IdeSettings;
@@ -6,7 +7,8 @@ namespace SharpIDE.Godot;
public static class Singletons
{
public static RunService RunService { get; } = new RunService();
public static BuildService BuildService { get; } = new BuildService();
public static RunService RunService { get; set; } = null!;
public static BuildService BuildService { get; set; } = null!;
public static IdeFileWatcher FileWatcher { get; set; } = null!;
public static AppState AppState { get; set; } = null!;
}