Пример #1
0
 public override void WriteToSection(TextWriter sw, GUIDToCommentMap comments)
 {
     sw.WriteLine(String.Format("\t\t{0} = {{isa = PBXBuildFile; fileRef = {1}; {2}}};",
                                CommentedGUID.Write(guid, comments),
                                CommentedGUID.Write(fileRef, comments),
                                postfix));
 }
Пример #2
0
 public void Write(TextWriter sw, GUIDToCommentMap comments)
 {
     sw.WriteLine("\t\t\t\t{");
     sw.WriteLine(String.Format("\t\t\t\t\tProductGroup = {0};", CommentedGUID.Write(group, comments)));
     sw.WriteLine(String.Format("\t\t\t\t\tProjectRef = {0};", CommentedGUID.Write(projectRef, comments)));
     sw.WriteLine("\t\t\t\t},");
 }
Пример #3
0
        protected void WriteCommentedGuidListProperty(string prop, TextWriter sw, GUIDToCommentMap comments)
        {
            List <string> list = m_ListProperties[prop];

            bool sortCommentedGuidLists = false;

            if (sortCommentedGuidLists)
            {
                // useful in large projects as Xcode does not sort directory contents by default
                var sorted = new List <KeyValuePair <string, string> >();
                foreach (string v in list)
                {
                    sorted.Add(new KeyValuePair <string, string>(comments[v], v));
                }

                sorted.Sort((a, b) =>
                {
                    if (a.Key != null && b.Key != null)
                    {
                        return(String.Compare(a.Key, b.Key, false));
                    }
                    else
                    {
                        return(0);
                    }
                });

                list.Clear();
                foreach (var kv in sorted)
                {
                    list.Add(kv.Value);
                }
            }

            sw.WriteLine("\t\t\t{0} = (", prop);
            foreach (string v in list)
            {
                sw.WriteLine("\t\t\t\t{0},", CommentedGUID.Write(v, comments));
            }
            sw.WriteLine("\t\t\t);");
        }
Пример #4
0
        public override void WriteToSection(TextWriter sw, GUIDToCommentMap comments)
        {
            // TODO: the implementation works but is not elegant

            var processedProperties = new HashSet <string>();
            var allProps            = new List <string>();

            allProps.AddRange(GetPropertyNames());
            allProps.Sort();

            sw.WriteLine(String.Format("\t\t{0} = {{", CommentedGUID.Write(guid, comments)));
            WritePropertyWrapper("isa", processedProperties, sw, comments); // always the first
            foreach (var prop in allProps)
            {
                WritePropertyWrapper(prop, processedProperties, sw, comments);
            }
            foreach (var line in m_BadLines)
            {
                sw.WriteLine(line);
            }
            sw.WriteLine("\t\t};");
        }
Пример #5
0
 public override void WriteToSection(TextWriter sw, GUIDToCommentMap comments)
 {
     sw.WriteLine(String.Format("\t\t{0} = {1};", CommentedGUID.Write(guid, comments), text));
 }
Пример #6
0
 protected void WriteCommentedGuidProperty(string prop, TextWriter sw, GUIDToCommentMap comments)
 {
     sw.WriteLine("\t\t\t{0} = {1};", prop, CommentedGUID.Write(m_Properties[prop], comments));
 }