MCPcopy Create free account
hub / github.com/antopilo/Nuake / LoadProject

Method LoadProject

Editor/Source/Editor/Windows/EditorInterface.cpp:3245–3271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3243 }
3244
3245 bool EditorInterface::LoadProject(const std::string& projectPath)
3246 {
3247 FileSystem::SetRootDirectory(FileSystem::GetParentPath(projectPath));
3248
3249 auto project = Project::New();
3250 auto projectFileData = FileSystem::ReadFile(projectPath, true);
3251 Logger::Log("Reading file project: " + projectFileData, "window", VERBOSE);
3252 try
3253 {
3254 Logger::Log("Starting deserializing", "window", VERBOSE);
3255 project->Deserialize(json::parse(projectFileData));
3256 project->FullPath = projectPath;
3257
3258 Engine::LoadProject(project);
3259
3260 filesystem->m_CurrentDirectory = Nuake::FileSystem::RootDirectory;
3261 }
3262 catch (std::exception exception)
3263 {
3264 Logger::Log("Error loading project: " + projectPath, "editor", CRITICAL);
3265 SetStatusMessage("Error loading project: " + projectPath);
3266 Logger::Log(exception.what());
3267 return false;
3268 }
3269
3270 return true;
3271 }
3272
3273}

Callers

nothing calls this directly

Calls 4

LogFunction · 0.85
parseFunction · 0.85
DeserializeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected