Migrate ProjectManager to dependency injection

- Created IProjectManager interface
- ProjectManager now implements IProjectManager
- Removed ProjectManager::Get() singleton
- Added IEditorContext::GetProjectManager()
- ProjectPanel now uses m_context->GetProjectManager() instead of singleton
- EditorContext owns ProjectManager instance
This commit is contained in:
2026-03-25 16:25:55 +08:00
parent 56116b62c3
commit d4c94907ba
7 changed files with 98 additions and 35 deletions

View File

@@ -9,11 +9,6 @@ namespace fs = std::filesystem;
namespace XCEngine {
namespace Editor {
ProjectManager& ProjectManager::Get() {
static ProjectManager instance;
return instance;
}
std::vector<AssetItemPtr>& ProjectManager::GetCurrentItems() {
if (m_path.empty()) {
static std::vector<AssetItemPtr> empty;