refactor(generators): 统一添加必要的命名空间引用

- 在 BindNodeSignalDiagnostics.cs 中添加 Microsoft.CodeAnalysis 引用
- 在 BindNodeSignalGenerator.cs 中添加 Roslyn 相关命名空间引用
- 在 GetNodeGenerator.cs 中添加 Roslyn 相关命名空间引用
- 在 GlobalUsings.cs 中集中管理全局命名空间引用
- 在 ContextGetGenerator.cs 中添加字符串和扩展方法引用
- 在 CommonDiagnostics.cs 中添加诊断相关命名空间引用
- 在 Common 全局引用文件中统一管理 Microsoft.CodeAnalysis 引用
This commit is contained in:
GeWuYou 2026-03-31 12:09:47 +08:00
parent 6fa4580893
commit 693cad2adf
5 changed files with 14 additions and 2 deletions

View File

@ -1,7 +1,10 @@
using System.Collections.Immutable;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Text;
using GFramework.Godot.SourceGenerators.Diagnostics; using GFramework.Godot.SourceGenerators.Diagnostics;
using GFramework.SourceGenerators.Common.Constants; using GFramework.SourceGenerators.Common.Constants;
using GFramework.SourceGenerators.Common.Diagnostics; using GFramework.SourceGenerators.Common.Diagnostics;
using GFramework.SourceGenerators.Common.Extensions;
namespace GFramework.Godot.SourceGenerators; namespace GFramework.Godot.SourceGenerators;

View File

@ -1,6 +1,9 @@
using System.Collections.Immutable;
using System.Text;
using GFramework.Godot.SourceGenerators.Diagnostics; using GFramework.Godot.SourceGenerators.Diagnostics;
using GFramework.SourceGenerators.Common.Constants; using GFramework.SourceGenerators.Common.Constants;
using GFramework.SourceGenerators.Common.Diagnostics; using GFramework.SourceGenerators.Common.Diagnostics;
using GFramework.SourceGenerators.Common.Extensions;
namespace GFramework.Godot.SourceGenerators; namespace GFramework.Godot.SourceGenerators;

View File

@ -15,4 +15,7 @@ global using System;
global using System.Collections.Generic; global using System.Collections.Generic;
global using System.Linq; global using System.Linq;
global using System.Threading; global using System.Threading;
global using System.Threading.Tasks; global using System.Threading.Tasks;
global using Microsoft.CodeAnalysis;
global using Microsoft.CodeAnalysis.CSharp;
global using Microsoft.CodeAnalysis.CSharp.Syntax;

View File

@ -15,4 +15,5 @@ global using System;
global using System.Collections.Generic; global using System.Collections.Generic;
global using System.Linq; global using System.Linq;
global using System.Threading; global using System.Threading;
global using System.Threading.Tasks; global using System.Threading.Tasks;
global using Microsoft.CodeAnalysis;

View File

@ -1,5 +1,7 @@
using System.Text;
using GFramework.SourceGenerators.Common.Constants; using GFramework.SourceGenerators.Common.Constants;
using GFramework.SourceGenerators.Common.Diagnostics; using GFramework.SourceGenerators.Common.Diagnostics;
using GFramework.SourceGenerators.Common.Extensions;
using GFramework.SourceGenerators.Common.Info; using GFramework.SourceGenerators.Common.Info;
using GFramework.SourceGenerators.Diagnostics; using GFramework.SourceGenerators.Diagnostics;