public void Clear() { buildFiles = new PBXBuildFileSection("PBXBuildFile"); fileRefs = new PBXFileReferenceSection("PBXFileReference"); groups = new PBXGroupSection("PBXGroup"); containerItems = new PBXContainerItemProxySection("PBXContainerItemProxy"); references = new PBXReferenceProxySection("PBXReferenceProxy"); sources = new PBXSourcesBuildPhaseSection("PBXSourcesBuildPhase"); frameworks = new PBXFrameworksBuildPhaseSection("PBXFrameworksBuildPhase"); resources = new PBXResourcesBuildPhaseSection("PBXResourcesBuildPhase"); copyFiles = new PBXCopyFilesBuildPhaseSection("PBXCopyFilesBuildPhase"); shellScripts = new PBXShellScriptBuildPhaseSection("PBXShellScriptBuildPhase"); nativeTargets = new PBXNativeTargetSection("PBXNativeTarget"); targetDependencies = new PBXTargetDependencySection("PBXTargetDependency"); variantGroups = new PBXVariantGroupSection("PBXVariantGroup"); buildConfigs = new XCBuildConfigurationSection("XCBuildConfiguration"); configs = new XCConfigurationListSection("XCConfigurationList"); project = new PBXProjectSection(); m_UnknownSections = new Dictionary <string, UnknownSection> (); m_Section = new Dictionary <string, SectionBase> { { "PBXBuildFile", buildFiles }, { "PBXFileReference", fileRefs }, { "PBXGroup", groups }, { "PBXContainerItemProxy", containerItems }, { "PBXReferenceProxy", references }, { "PBXSourcesBuildPhase", sources }, { "PBXFrameworksBuildPhase", frameworks }, { "PBXResourcesBuildPhase", resources }, { "PBXCopyFilesBuildPhase", copyFiles }, { "PBXShellScriptBuildPhase", shellScripts }, { "PBXNativeTarget", nativeTargets }, { "PBXTargetDependency", targetDependencies }, { "PBXVariantGroup", variantGroups }, { "XCBuildConfiguration", buildConfigs }, { "XCConfigurationList", configs }, { "PBXProject", project }, }; m_RootElements = new PBXElementDict(); m_UnknownObjects = new PBXElementDict(); m_ObjectVersion = null; m_SectionOrder = new List <string> { "PBXBuildFile", "PBXContainerItemProxy", "PBXCopyFilesBuildPhase", "PBXFileReference", "PBXFrameworksBuildPhase", "PBXGroup", "PBXNativeTarget", "PBXProject", "PBXReferenceProxy", "PBXResourcesBuildPhase", "PBXShellScriptBuildPhase", "PBXSourcesBuildPhase", "PBXTargetDependency", "PBXVariantGroup", "XCBuildConfiguration", "XCConfigurationList" }; m_FileGuidToBuildFileMap = new Dictionary <string, Dictionary <string, PBXBuildFileData> > (); m_ProjectPathToFileRefMap = new Dictionary <string, PBXFileReferenceData> (); m_FileRefGuidToProjectPathMap = new Dictionary <string, string> (); m_RealPathToFileRefMap = new Dictionary <PBXSourceTree, Dictionary <string, PBXFileReferenceData> > (); foreach (var tree in FileTypeUtils.AllAbsoluteSourceTrees()) { m_RealPathToFileRefMap.Add(tree, new Dictionary <string, PBXFileReferenceData> ()); } m_ProjectPathToGroupMap = new Dictionary <string, PBXGroupData> (); m_GroupGuidToProjectPathMap = new Dictionary <string, string> (); m_GuidToParentGroupMap = new Dictionary <string, PBXGroupData> (); }
public void FileRefsRemove(string guid) { PBXFileReferenceData fileRef = fileRefs[guid]; fileRefs.RemoveEntry(guid); m_ProjectPathToFileRefMap.Remove(m_FileRefGuidToProjectPathMap[guid]); m_FileRefGuidToProjectPathMap.Remove(guid); foreach (var tree in FileTypeUtils.AllAbsoluteSourceTrees()) { m_RealPathToFileRefMap[tree].Remove(fileRef.path); } m_GuidToParentGroupMap.Remove(guid); }
public string FindFileGuidByRealPath(string path) { path = Utils.FixSlashesInPath(path); foreach (var tree in FileTypeUtils.AllAbsoluteSourceTrees()) { string res = FindFileGuidByRealPath(path, tree); if (res != null) { return(res); } } return(null); }