Beispiel #1
0
        void RefreshMapsForVariantGroupChildren(string projectPath, string realPath, PBXSourceTree realPathTree, PBXVariantGroupData parent)
        {
            var children = new List <string>(parent.children);

            foreach (string guid in children)
            {
                PBXFileReferenceData fileRef = fileRefs[guid];
                string        pPath;
                string        rPath;
                PBXSourceTree rTree;

                if (fileRef != null)
                {
                    pPath = PBXPath.Combine(projectPath, fileRef.name);
                    PBXPath.Combine(realPath, realPathTree, fileRef.path, fileRef.tree, out rPath, out rTree);

                    if (!m_ProjectPathToFileRefMap.ContainsKey(pPath))
                    {
                        m_ProjectPathToFileRefMap.Add(pPath, fileRef);
                    }
                    if (!m_FileRefGuidToProjectPathMap.ContainsKey(fileRef.guid))
                    {
                        m_FileRefGuidToProjectPathMap.Add(fileRef.guid, pPath);
                    }
                    if (!m_RealPathToFileRefMap[rTree].ContainsKey(rPath))
                    {
                        m_RealPathToFileRefMap[rTree].Add(rPath, fileRef);
                    }
                    if (!m_GuidToParentVariantGroupMap.ContainsKey(guid))
                    {
                        m_GuidToParentVariantGroupMap.Add(guid, parent);
                    }

                    continue;
                }

                PBXVariantGroupData gr = variantGroups[guid];
                if (gr != null)
                {
                    pPath = PBXPath.Combine(projectPath, gr.name);
                    PBXPath.Combine(realPath, realPathTree, gr.path, gr.tree, out rPath, out rTree);

                    if (!m_ProjectPathToVariantGroupMap.ContainsKey(pPath))
                    {
                        m_ProjectPathToVariantGroupMap.Add(pPath, gr);
                    }
                    if (!m_VariantGroupGuidToProjectPathMap.ContainsKey(gr.guid))
                    {
                        m_VariantGroupGuidToProjectPathMap.Add(gr.guid, pPath);
                    }
                    if (!m_GuidToParentVariantGroupMap.ContainsKey(guid))
                    {
                        m_GuidToParentVariantGroupMap.Add(guid, parent);
                    }

                    RefreshMapsForVariantGroupChildren(pPath, rPath, rTree, gr);
                }
            }
        }
Beispiel #2
0
 public void VariantGroupsAddDuplicate(PBXVariantGroupData gr)
 {
     variantGroups.AddEntry(gr);
 }