new_editor: remove win32 no-op redundancy

This commit is contained in:
2026-04-23 01:44:22 +08:00
parent 514dee10cc
commit e63457c72b
11 changed files with 103 additions and 143 deletions

View File

@@ -0,0 +1,56 @@
# NewEditor Win32 No-Op Redundancy Cleanup Plan
日期2026-04-23
## 目标
`new_editor/app/Platform/Win32` 内只清理可证明为 no-op 的真冗余代码,要求:
- 必须减少代码量
- 不改变现有 Win32 生命周期、即时帧、分路径刷新机制
- 每个阶段完成后立即编译 `XCUIEditorApp`
- 每个阶段完成后立即执行 `new_editor` 启动/关闭冒烟
## 冗余判定
本次只处理两类已经确认的 no-op 冗余:
1. `EditorWindowContentController` 接口中本就具备天然默认值的可选能力,被强制下发到 `EditorStandaloneUtilityWindowContentController`,形成一大片空 override 样板。
2. `EditorUtilityWindowCoordinator` 中完全不产生行为的空接口:
- `RegisterExistingWindow`
- `RefreshWindowPresentation`
以及它们在 host runtime / message dispatcher / window manager 中对应的空调用链。
## Phase A
下沉 `EditorWindowContentController` 的可选默认行为,删除 utility content controller 的空 override / 空实现,只保留 utility 窗口真正需要的行为。
验证:
- 编译 `XCUIEditorApp`
- 启动 `XCUIEditor.exe`
- 观察初始化与关闭日志是否正常
## Phase B
删除 `EditorUtilityWindowCoordinator` 的空注册 / 空 presentation API 与所有调用点,只保留真正处理 utility window transfer request 的路径。
验证:
- 编译 `XCUIEditorApp`
- 启动 `XCUIEditor.exe`
- 观察初始化与关闭日志是否正常
## 收口
- 更新计划状态
- 将完成计划归档到 `docs/used`
## 完成结果
- Phase A 完成:`EditorWindowContentController` 下沉了可选默认行为,`EditorStandaloneUtilityWindowContentController` 删除了大段空 override / 空实现。
- Phase B 完成:`EditorUtilityWindowCoordinator` 的空注册 / 空 presentation API 及对应空调用链已经删除。
- 两次验证均通过:
- `cmake --build build --config Debug --target XCUIEditorApp`
- 启动 `build/new_editor/Debug/XCUIEditor.exe`
- 运行日志出现新的 `initialize end``shutdown end` 闭环