const FUProjectDictionary &FDesktopPlatformBase::GetCachedProjectDictionary(const FString& RootDir) { FString NormalizedRootDir = RootDir; FPaths::NormalizeDirectoryName(NormalizedRootDir); FUProjectDictionary *Dictionary = CachedProjectDictionaries.Find(NormalizedRootDir); if(Dictionary == NULL) { Dictionary = &CachedProjectDictionaries.Add(RootDir, FUProjectDictionary(RootDir)); } return *Dictionary; }
FString FQtCreatorSourceCodeAccessor::GetSolutionPath() const { if(IsInGameThread()) { CachedSolutionPath = FPaths::ConvertRelativePathToFull(FPaths::ProjectDir()); if (!FUProjectDictionary(FPaths::RootDir()).IsForeignProject(CachedSolutionPath)) { CachedSolutionPath = FPaths::Combine(FPaths::RootDir(), TEXT("UE4.pro")); } else { FString BaseName = FApp::HasProjectName() ? FApp::GetProjectName() : FPaths::GetBaseFilename(CachedSolutionPath); CachedSolutionPath = FPaths::Combine(CachedSolutionPath, BaseName + TEXT(".pro")); } } return CachedSolutionPath; }
FString FCodeLiteSourceCodeAccessor::GetSolutionPath() const { FScopeLock Lock(&CachedSolutionPathCriticalSection); if (IsInGameThread()) { CachedSolutionPath = FPaths::ProjectDir(); if (!FUProjectDictionary(FPaths::RootDir()).IsForeignProject(CachedSolutionPath)) { CachedSolutionPath = FPaths::Combine(FPaths::RootDir(), TEXT("UE4.workspace")); } else { FString BaseName = FApp::HasProjectName() ? FApp::GetProjectName() : FPaths::GetBaseFilename(CachedSolutionPath); CachedSolutionPath = FPaths::Combine(CachedSolutionPath, BaseName + TEXT(".workspace")); } } return CachedSolutionPath; }