Пример #1
0
        public static void WriteDictKeyValue(StringBuilder sb, string key, PBXElement value, int indent, bool compact,
                                             PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            if (!compact)
            {
                sb.Append("\n");
                sb.Append(GetIndent(indent));
            }
            WriteStringImpl(sb, key, checker.CheckKeyInDict(key), comments);
            sb.Append(" = ");

            if (value is PBXElementString)
            {
                WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInDict(key, value.AsString()), comments);
            }
            else if (value is PBXElementDict)
            {
                WriteDict(sb, value.AsDict(), indent, compact, checker.NextLevel(key), comments);
            }
            else if (value is PBXElementArray)
            {
                WriteArray(sb, value.AsArray(), indent, compact, checker.NextLevel(key), comments);
            }
            sb.Append(";");
            if (compact)
            {
                sb.Append(" ");
            }
        }
Пример #2
0
        public static void WriteDict(StringBuilder sb, PBXElementDict el, int indent, bool compact,
                                     PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            sb.Append("{");

            if (el.Contains("isa"))
            {
                WriteDictKeyValue(sb, "isa", el["isa"], indent + 1, compact, checker, comments);
            }
            var keys = new List <string>(el.values.Keys);

            keys.Sort(StringComparer.Ordinal);
            foreach (var key in keys)
            {
                if (key != "isa")
                {
                    WriteDictKeyValue(sb, key, el[key], indent + 1, compact, checker, comments);
                }
            }
            if (!compact)
            {
                sb.Append("\n");
                sb.Append(GetIndent(indent));
            }
            sb.Append("}");
        }
Пример #3
0
        static PBXProjectObjectData()
        {
            string[] strArray = new string[5];
            int      index1   = 0;
            string   str1     = "buildConfigurationList/*";

            strArray[index1] = str1;
            int    index2 = 1;
            string str2   = "mainGroup/*";

            strArray[index2] = str2;
            int    index3 = 2;
            string str3   = "projectReferences/*/ProductGroup/*";

            strArray[index3] = str3;
            int    index4 = 3;
            string str4   = "projectReferences/*/ProjectRef/*";

            strArray[index4] = str4;
            int    index5 = 4;
            string str5   = "targets/*";

            strArray[index5] = str5;
            PBXProjectObjectData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #4
0
        static PBXNativeTargetData()
        {
            string[] strArray = new string[5];
            int      index1   = 0;
            string   str1     = "buildPhases/*";

            strArray[index1] = str1;
            int    index2 = 1;
            string str2   = "buildRules/*";

            strArray[index2] = str2;
            int    index3 = 2;
            string str3   = "dependencies/*";

            strArray[index3] = str3;
            int    index4 = 3;
            string str4   = "productReference/*";

            strArray[index4] = str4;
            int    index5 = 4;
            string str5   = "buildConfigurationList/*";

            strArray[index5] = str5;
            PBXNativeTargetData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #5
0
 public static void WriteArray(StringBuilder sb, PBXElementArray el, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments)
 {
     sb.Append("(");
     foreach (PBXElement element in el.values)
     {
         if (!compact)
         {
             sb.Append("\n");
             sb.Append(GetIndent(indent + 1));
         }
         if (element is PBXElementString)
         {
             WriteStringImpl(sb, element.AsString(), checker.CheckStringValueInArray(element.AsString()), comments);
         }
         else if (element is PBXElementDict)
         {
             WriteDict(sb, element.AsDict(), indent + 1, compact, checker.NextLevel("*"), comments);
         }
         else if (element is PBXElementArray)
         {
             WriteArray(sb, element.AsArray(), indent + 1, compact, checker.NextLevel("*"), comments);
         }
         sb.Append(",");
         if (compact)
         {
             sb.Append(" ");
         }
     }
     if (!compact)
     {
         sb.Append("\n");
         sb.Append(GetIndent(indent));
     }
     sb.Append(")");
 }
Пример #6
0
        static XCConfigurationListData()
        {
            string[] strArray = new string[1];
            int      index    = 0;
            string   str      = "buildConfigurations/*";

            strArray[index] = str;
            XCConfigurationListData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #7
0
        static PBXReferenceProxyData()
        {
            string[] strArray = new string[1];
            int      index    = 0;
            string   str      = "remoteRef/*";

            strArray[index] = str;
            PBXReferenceProxyData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #8
0
        static PBXGroupData()
        {
            string[] strArray = new string[1];
            int      index    = 0;
            string   str      = "children/*";

            strArray[index]          = str;
            PBXGroupData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #9
0
        static PBXContainerItemProxyData()
        {
            string[] strArray = new string[1];
            int      index    = 0;
            string   str      = "containerPortal/*";

            strArray[index] = str;
            PBXContainerItemProxyData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #10
0
        static PBXCopyFilesBuildPhaseData()
        {
            string[] strArray = new string[1];
            int      index    = 0;
            string   str      = "files/*";

            strArray[index] = str;
            PBXCopyFilesBuildPhaseData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #11
0
        static FileGUIDListBase()
        {
            string[] strArray = new string[1];
            int      index    = 0;
            string   str      = "files/*";

            strArray[index] = str;
            FileGUIDListBase.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #12
0
        static PBXTargetDependencyData()
        {
            string[] strArray = new string[2];
            int      index1   = 0;
            string   str1     = "target/*";

            strArray[index1] = str1;
            int    index2 = 1;
            string str2   = "targetProxy/*";

            strArray[index2] = str2;
            PBXTargetDependencyData.checkerData = new PropertyCommentChecker((IEnumerable <string>)strArray);
        }
Пример #13
0
        public static void WriteArray(StringBuilder sb, PBXElementArray el, int indent, bool compact,
                                      PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            sb.Append("(");
            foreach (var value in el.values)
            {
                if (!compact)
                {
                    sb.Append("\n");
                    sb.Append(GetIndent(indent + 1));
                }

                if (value is PBXElementString)
                {
                    WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInArray(value.AsString()), comments);
                }
                else if (value is PBXElementDict)
                {
                    WriteDict(sb, value.AsDict(), indent + 1, compact, checker.NextLevel("*"), comments);
                }
                else if (value is PBXElementArray)
                {
                    WriteArray(sb, value.AsArray(), indent + 1, compact, checker.NextLevel("*"), comments);
                }
                sb.Append(",");
                if (compact)
                {
                    sb.Append(" ");
                }
            }

            if (!compact)
            {
                sb.Append("\n");
                sb.Append(GetIndent(indent));
            }
            sb.Append(")");
        }
Пример #14
0
 static PBXGroupData()
 {
     string[] props = new string[] { "children/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static PBXShellScriptBuildPhaseData()
 {
     string[] props = new string[] { "files/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #16
0
 static FileGUIDListBase()
 {
     string[] props = new string[] { "files/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #17
0
 static PBXContainerItemProxyData()
 {
     string[] props = new string[] { "containerPortal/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #18
0
 public static void WriteDict(StringBuilder sb, PBXElementDict el, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments)
 {
     sb.Append("{");
     if (el.Contains("isa"))
     {
         WriteDictKeyValue(sb, "isa", el["isa"], indent + 1, compact, checker, comments);
     }
     List<string> list = new List<string>(el.values.Keys);
     list.Sort(StringComparer.Ordinal);
     foreach (string str in list)
     {
         if (str != "isa")
         {
             WriteDictKeyValue(sb, str, el[str], indent + 1, compact, checker, comments);
         }
     }
     if (!compact)
     {
         sb.Append("\n");
         sb.Append(GetIndent(indent));
     }
     sb.Append("}");
 }
 static PBXShellScriptBuildPhaseData()
 {
     string[] props = new string[] { "files/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #20
0
 static PBXGroupData()
 {
     string[] props = new string[] { "children/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #21
0
 static FileGUIDListBase()
 {
     string[] props = new string[] { "files/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #22
0
        public static void WriteDict(StringBuilder sb, PBXElementDict el, int indent, bool compact, 
                                     PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            sb.Append("{");

            if (el.Contains("isa"))
                WriteDictKeyValue(sb, "isa", el["isa"], indent+1, compact, checker, comments);
            var keys = new List<string>(el.values.Keys);
            keys.Sort(StringComparer.Ordinal);
            foreach (var key in keys)
            {
                if (key != "isa")
                    WriteDictKeyValue(sb, key, el[key], indent+1, compact, checker, comments);
            }
            if (!compact)
            {
                sb.Append("\n");
                sb.Append(GetIndent(indent));
            }
            sb.Append("}");
        }
 static PBXTargetDependencyData()
 {
     string[] props = new string[] { "target/*", "targetProxy/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static XCConfigurationListData()
 {
     string[] props = new string[] { "buildConfigurations/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static PBXContainerItemProxyData()
 {
     string[] props = new string[] { "containerPortal/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static PBXProjectObjectData()
 {
     string[] props = new string[] { "buildConfigurationList/*", "mainGroup/*", "projectReferences/*/ProductGroup/*", "projectReferences/*/ProjectRef/*", "targets/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #27
0
        public static void WriteDict(StringBuilder sb, PBXElementDict el, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            sb.Append("{");
            if (el.Contains("isa"))
            {
                Serializer.WriteDictKeyValue(sb, "isa", el["isa"], indent + 1, compact, checker, comments);
            }
            List <string> list = new List <string>((IEnumerable <string>)el.values.Keys);

            list.Sort((IComparer <string>)StringComparer.Ordinal);
            foreach (string key in list)
            {
                if (key != "isa")
                {
                    Serializer.WriteDictKeyValue(sb, key, el[key], indent + 1, compact, checker, comments);
                }
            }
            if (!compact)
            {
                sb.Append("\n");
                sb.Append(Serializer.GetIndent(indent));
            }
            sb.Append("}");
        }
Пример #28
0
 static PBXReferenceProxyData()
 {
     string[] props = new string[] { "remoteRef/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static PBXNativeTargetData()
 {
     string[] props = new string[] { "buildPhases/*", "buildRules/*", "dependencies/*", "productReference/*", "buildConfigurationList/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static PBXProjectObjectData()
 {
     string[] props = new string[] { "buildConfigurationList/*", "mainGroup/*", "projectReferences/*/ProductGroup/*", "projectReferences/*/ProjectRef/*", "targets/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #31
0
 static PBXCopyFilesBuildPhaseData()
 {
     string[] props = new string[] { "files/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #32
0
 static PBXBuildFileData()
 {
     string[] props = new string[] { "fileRef/*" };
     checkerData = new PropertyCommentChecker(props);
 }
Пример #33
0
        public static void WriteDictKeyValue(StringBuilder sb, string key, PBXElement value, int indent, bool compact, 
                                             PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            if (!compact)
            {
                sb.Append("\n");
                sb.Append(GetIndent(indent));
            }
            WriteStringImpl(sb, key, checker.CheckKeyInDict(key), comments);
            sb.Append(" = ");

            if (value is PBXElementString)
                WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInDict(key, value.AsString()), comments);
            else if (value is PBXElementDict)
                WriteDict(sb, value.AsDict(), indent, compact, checker.NextLevel(key), comments);
            else if (value is PBXElementArray)
                WriteArray(sb, value.AsArray(), indent, compact, checker.NextLevel(key), comments);
            sb.Append(";");
            if (compact)
                sb.Append(" ");
        }
 static PBXCopyFilesBuildPhaseData()
 {
     string[] props = new string[] { "files/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static PBXNativeTargetData()
 {
     string[] props = new string[] { "buildPhases/*", "buildRules/*", "dependencies/*", "productReference/*", "buildConfigurationList/*" };
     checkerData = new PropertyCommentChecker(props);
 }
 static XCConfigurationListData()
 {
     string[] props = new string[] { "buildConfigurations/*" };
     checkerData = new PropertyCommentChecker(props);
 }