5 Commits

Author SHA1 Message Date
GeWuYou
693cad2adf refactor(generators): 统一添加必要的命名空间引用
- 在 BindNodeSignalDiagnostics.cs 中添加 Microsoft.CodeAnalysis 引用
- 在 BindNodeSignalGenerator.cs 中添加 Roslyn 相关命名空间引用
- 在 GetNodeGenerator.cs 中添加 Roslyn 相关命名空间引用
- 在 GlobalUsings.cs 中集中管理全局命名空间引用
- 在 ContextGetGenerator.cs 中添加字符串和扩展方法引用
- 在 CommonDiagnostics.cs 中添加诊断相关命名空间引用
- 在 Common 全局引用文件中统一管理 Microsoft.CodeAnalysis 引用
2026-03-31 12:09:47 +08:00
GeWuYou
6fa4580893 feat(generator): 添加 BindNodeSignal 和 GetNode 源代码生成器
- 实现 BindNodeSignalGenerator 用于生成节点信号绑定与解绑逻辑
- 实现 GetNodeGenerator 用于生成 Godot 节点获取注入逻辑
- 添加 BindNodeSignalDiagnostics 提供详细的诊断错误信息
- 集成到 AnalyzerReleases.Unshipped.md 追踪新的分析规则
- 支持 [BindNodeSignal] 属性的方法自动生成事件绑定代码
- 支持 [GetNode] 属性的字段自动生成节点获取代码
- 提供生命周期方法集成的智能提示和验证功能
2026-03-31 11:11:23 +08:00
deepsource-autofix[bot]
c70728b64e refactor: simplify lambda
This PR refactors a lambda expression that contained unnecessary braces around a single-statement body, converting it into a more concise expression-bodied form to improve readability and maintainability.

- Consider simplifying lambda when its body has a single statement: The original lambda used a block body with braces and a single call to Execute, which is verbose for a one-line operation. We removed the braces and semicolon, converting it into an expression-bodied lambda (`static (spc, pair) => Execute(spc, pair.Left, pair.Right)`) to simplify the code and follow best practices.

> This Autofix was generated by AI. Please review the change before merging.
2026-03-23 08:28:07 +08:00
GeWuYou
b95c65a30e refactor(generator): 优化GetNodeGenerator代码结构
- 使用语法树遍历替代字符串匹配来检测注入方法调用
- 添加IsGeneratedInjectionInvocation辅助方法提高代码可读性
- 将字段分组逻辑从列表查找改为字典映射提升性能
- 优化GroupByContainingType方法的时间复杂度
2026-03-22 15:23:51 +08:00
GeWuYou
9ab09cf47b feat(godot): 添加 GetNode 源代码生成器功能
- 实现了 [GetNode] 属性用于标记 Godot 节点字段
- 创建了 GetNodeGenerator 源代码生成器自动注入节点获取逻辑
- 添加了节点路径推导和多种查找模式支持
- 集成了生成器到 Godot 脚手架模板中
- 添加了完整的诊断规则和错误提示
- 创建了单元测试验证生成器功能
- 更新了解决方案配置以包含新的测试项目
- 在 README 中添加了详细的使用文档和示例代码
2026-03-22 15:16:24 +08:00