Skip to content
This repository
Browse code

fix a bug in json highlight syntax

  • Loading branch information...
commit 2ee871da513bdc43a2a4f1e0c050d4106bbc0615 1 parent 961c1e8
Prof Syd Xu authored December 30, 2010
16  MongoHub.xcodeproj/syd.mode1v3
@@ -288,7 +288,7 @@
288 288
 								</array>
289 289
 							</array>
290 290
 							<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
291  
-							<string>{{0, 726}, {245, 646}}</string>
  291
+							<string>{{0, 0}, {245, 646}}</string>
292 292
 						</dict>
293 293
 						<key>PBXTopSmartGroupGIDs</key>
294 294
 						<array/>
@@ -337,7 +337,7 @@
337 337
 										<key>_historyCapacity</key>
338 338
 										<integer>0</integer>
339 339
 										<key>bookmark</key>
340  
-										<string>1DDC497A12CBBEEC009924A1</string>
  340
+										<string>1DDC498D12CBC58A009924A1</string>
341 341
 										<key>history</key>
342 342
 										<array>
343 343
 											<string>1D93C3E211836A06003216F7</string>
@@ -437,27 +437,27 @@
437 437
 											<string>1DD1CAD512C9059D007F2909</string>
438 438
 											<string>1DD1CAD612C9059D007F2909</string>
439 439
 											<string>1DD1CAEA12C908A6007F2909</string>
440  
-											<string>1D245D6412CB6C7500665802</string>
441 440
 											<string>1D245D6512CB6C7500665802</string>
442 441
 											<string>1D245D6612CB6C7500665802</string>
443 442
 											<string>1D245D6712CB6C7500665802</string>
444 443
 											<string>1D46B0BD12CB76E4001E599C</string>
445  
-											<string>1DDC491D12CBB720009924A1</string>
446 444
 											<string>1DDC491E12CBB720009924A1</string>
447 445
 											<string>1DDC491F12CBB720009924A1</string>
448  
-											<string>1DDC492012CBB720009924A1</string>
449 446
 											<string>1DDC492112CBB720009924A1</string>
450 447
 											<string>1DDC492212CBB720009924A1</string>
451 448
 											<string>1DDC492312CBB720009924A1</string>
452 449
 											<string>1DDC492412CBB720009924A1</string>
453  
-											<string>1DDC492512CBB720009924A1</string>
454 450
 											<string>1DDC492612CBB720009924A1</string>
455 451
 											<string>1DDC492712CBB720009924A1</string>
456 452
 											<string>1DDC492812CBB720009924A1</string>
457 453
 											<string>1DDC492912CBB720009924A1</string>
458 454
 											<string>1DDC494D12CBB964009924A1</string>
459 455
 											<string>1DDC495C12CBBA96009924A1</string>
460  
-											<string>1DDC495D12CBBA96009924A1</string>
  456
+											<string>1DDC498112CBC43D009924A1</string>
  457
+											<string>1DDC498212CBC43D009924A1</string>
  458
+											<string>1DDC498312CBC43D009924A1</string>
  459
+											<string>1DDC498B12CBC58A009924A1</string>
  460
+											<string>1DDC498C12CBC58A009924A1</string>
461 461
 										</array>
462 462
 									</dict>
463 463
 									<key>SplitCount</key>
@@ -657,10 +657,10 @@
657 657
 	<array>
658 658
 		<string>1DDC493112CBB720009924A1</string>
659 659
 		<string>1DDC493212CBB720009924A1</string>
660  
-		<string>1C78EAAD065D492600B07095</string>
661 660
 		<string>1CD10A99069EF8BA00B06720</string>
662 661
 		<string>1D93C1AB118329FB003216F7</string>
663 662
 		<string>/Users/syd/Documents/Works/codes/MongoHub/MongoHub.xcodeproj</string>
  663
+		<string>1C78EAAD065D492600B07095</string>
664 664
 	</array>
665 665
 	<key>WindowString</key>
666 666
 	<string>90 73 1129 705 0 0 1280 778 </string>
155  MongoHub.xcodeproj/syd.pbxuser
@@ -461,9 +461,9 @@
461 461
 	};
462 462
 	1D64100712C8E21C0030AA4C /* UKSyntaxColoredTextViewController.m */ = {
463 463
 		uiCtxt = {
464  
-			sepNavIntBoundsRect = "{{0, 0}, {801, 18298}}";
465  
-			sepNavSelRange = "{34145, 16}";
466  
-			sepNavVisRange = "{33633, 1384}";
  464
+			sepNavIntBoundsRect = "{{0, 0}, {801, 18774}}";
  465
+			sepNavSelRange = "{26885, 0}";
  466
+			sepNavVisRange = "{26437, 1548}";
467 467
 		};
468 468
 	};
469 469
 	1D64100B12C8E3D90030AA4C /* JsonWindowController.h */ = {
@@ -855,9 +855,9 @@
855 855
 	};
856 856
 	1D93C60A11841865003216F7 /* MongoDB.mm */ = {
857 857
 		uiCtxt = {
858  
-			sepNavIntBoundsRect = "{{0, 0}, {801, 16575}}";
859  
-			sepNavSelRange = "{15270, 10}";
860  
-			sepNavVisRange = "{49901, 1473}";
  858
+			sepNavIntBoundsRect = "{{0, 0}, {801, 18256}}";
  859
+			sepNavSelRange = "{10614, 0}";
  860
+			sepNavVisRange = "{11401, 1534}";
861 861
 			sepNavWindowFrame = "{{456, 164}, {813, 537}}";
862 862
 		};
863 863
 	};
@@ -1689,15 +1689,15 @@
1689 1689
 	1DD1CA8112C8EFD4007F2909 /* SyntaxDefinition.plist */ = {
1690 1690
 		uiCtxt = {
1691 1691
 			sepNavIntBoundsRect = "{{0, 0}, {801, 1414}}";
1692  
-			sepNavSelRange = "{0, 2181}";
  1692
+			sepNavSelRange = "{343, 0}";
1693 1693
 			sepNavVisRange = "{0, 740}";
1694 1694
 		};
1695 1695
 	};
1696 1696
 	1DD1CA8212C8EFD4007F2909 /* SyntaxColorDefaults.plist */ = {
1697 1697
 		uiCtxt = {
1698 1698
 			sepNavIntBoundsRect = "{{0, 0}, {801, 770}}";
1699  
-			sepNavSelRange = "{828, 1}";
1700  
-			sepNavVisRange = "{0, 818}";
  1699
+			sepNavSelRange = "{1016, 0}";
  1700
+			sepNavVisRange = "{586, 777}";
1701 1701
 		};
1702 1702
 	};
1703 1703
 	1DD1CA8612C8F004007F2909 /* CSS 1.plist */ = {
@@ -1776,9 +1776,9 @@
1776 1776
 	};
1777 1777
 	1DDC486812CB7758009924A1 /* JSON.plist */ = {
1778 1778
 		uiCtxt = {
1779  
-			sepNavIntBoundsRect = "{{0, 0}, {801, 2632}}";
1780  
-			sepNavSelRange = "{2154, 0}";
1781  
-			sepNavVisRange = "{1609, 762}";
  1779
+			sepNavIntBoundsRect = "{{0, 0}, {801, 2296}}";
  1780
+			sepNavSelRange = "{798, 0}";
  1781
+			sepNavVisRange = "{308, 660}";
1782 1782
 		};
1783 1783
 	};
1784 1784
 	1DDC491D12CBB720009924A1 /* PBXTextBookmark */ = {
@@ -1867,7 +1867,7 @@
1867 1867
 		fRef = 1D64100712C8E21C0030AA4C /* UKSyntaxColoredTextViewController.m */;
1868 1868
 		name = "UKSyntaxColoredTextViewController.m: 1026";
1869 1869
 		rLen = 16;
1870  
-		rLoc = 34145;
  1870
+		rLoc = 34547;
1871 1871
 		rType = 0;
1872 1872
 		vrLen = 1384;
1873 1873
 		vrLoc = 33633;
@@ -1937,7 +1937,7 @@
1937 1937
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
1938 1938
 		name = "JSON.plist: 57";
1939 1939
 		rLen = 0;
1940  
-		rLoc = 579;
  1940
+		rLoc = 211;
1941 1941
 		rType = 0;
1942 1942
 		vrLen = 696;
1943 1943
 		vrLoc = 979;
@@ -1947,7 +1947,7 @@
1947 1947
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
1948 1948
 		name = "JSON.plist: 141";
1949 1949
 		rLen = 0;
1950  
-		rLoc = 953;
  1950
+		rLoc = 585;
1951 1951
 		rType = 0;
1952 1952
 		vrLen = 671;
1953 1953
 		vrLoc = 2844;
@@ -1957,7 +1957,7 @@
1957 1957
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
1958 1958
 		name = "JSON.plist: 141";
1959 1959
 		rLen = 0;
1960  
-		rLoc = 953;
  1960
+		rLoc = 585;
1961 1961
 		rType = 0;
1962 1962
 		vrLen = 708;
1963 1963
 		vrLoc = 2844;
@@ -2087,7 +2087,7 @@
2087 2087
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2088 2088
 		name = "JSON.plist: 141";
2089 2089
 		rLen = 0;
2090  
-		rLoc = 953;
  2090
+		rLoc = 585;
2091 2091
 		rType = 0;
2092 2092
 		vrLen = 708;
2093 2093
 		vrLoc = 2844;
@@ -2097,7 +2097,7 @@
2097 2097
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2098 2098
 		name = "JSON.plist: 114";
2099 2099
 		rLen = 0;
2100  
-		rLoc = 579;
  2100
+		rLoc = 211;
2101 2101
 		rType = 0;
2102 2102
 		vrLen = 678;
2103 2103
 		vrLoc = 2117;
@@ -2107,7 +2107,7 @@
2107 2107
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2108 2108
 		name = "JSON.plist: 266";
2109 2109
 		rLen = 0;
2110  
-		rLoc = 4000;
  2110
+		rLoc = 3574;
2111 2111
 		rType = 0;
2112 2112
 		vrLen = 652;
2113 2113
 		vrLoc = 5056;
@@ -2117,7 +2117,7 @@
2117 2117
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2118 2118
 		name = "JSON.plist: 60";
2119 2119
 		rLen = 0;
2120  
-		rLoc = 953;
  2120
+		rLoc = 585;
2121 2121
 		rType = 0;
2122 2122
 		vrLen = 661;
2123 2123
 		vrLoc = 308;
@@ -2127,7 +2127,7 @@
2127 2127
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2128 2128
 		name = "JSON.plist: 33";
2129 2129
 		rLen = 0;
2130  
-		rLoc = 579;
  2130
+		rLoc = 211;
2131 2131
 		rType = 0;
2132 2132
 		vrLen = 653;
2133 2133
 		vrLoc = 345;
@@ -2137,7 +2137,7 @@
2137 2137
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2138 2138
 		name = "JSON.plist: 37";
2139 2139
 		rLen = 0;
2140  
-		rLoc = 579;
  2140
+		rLoc = 211;
2141 2141
 		rType = 0;
2142 2142
 		vrLen = 652;
2143 2143
 		vrLoc = 502;
@@ -2147,7 +2147,7 @@
2147 2147
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2148 2148
 		name = "JSON.plist: 78";
2149 2149
 		rLen = 0;
2150  
-		rLoc = 953;
  2150
+		rLoc = 585;
2151 2151
 		rType = 0;
2152 2152
 		vrLen = 661;
2153 2153
 		vrLoc = 1075;
@@ -2157,7 +2157,7 @@
2157 2157
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2158 2158
 		name = "JSON.plist: 42";
2159 2159
 		rLen = 0;
2160  
-		rLoc = 579;
  2160
+		rLoc = 211;
2161 2161
 		rType = 0;
2162 2162
 		vrLen = 676;
2163 2163
 		vrLoc = 615;
@@ -2167,7 +2167,7 @@
2167 2167
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2168 2168
 		name = "JSON.plist: 78";
2169 2169
 		rLen = 0;
2170  
-		rLoc = 953;
  2170
+		rLoc = 585;
2171 2171
 		rType = 0;
2172 2172
 		vrLen = 669;
2173 2173
 		vrLoc = 1336;
@@ -2177,7 +2177,7 @@
2177 2177
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2178 2178
 		name = "JSON.plist: 41";
2179 2179
 		rLen = 0;
2180  
-		rLoc = 579;
  2180
+		rLoc = 211;
2181 2181
 		rType = 0;
2182 2182
 		vrLen = 713;
2183 2183
 		vrLoc = 0;
@@ -2187,7 +2187,7 @@
2187 2187
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2188 2188
 		name = "JSON.plist: 95";
2189 2189
 		rLen = 0;
2190  
-		rLoc = 2119;
  2190
+		rLoc = 1693;
2191 2191
 		rType = 0;
2192 2192
 		vrLen = 729;
2193 2193
 		vrLoc = 1515;
@@ -2197,11 +2197,101 @@
2197 2197
 		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
2198 2198
 		name = "JSON.plist: 96";
2199 2199
 		rLen = 0;
2200  
-		rLoc = 2154;
  2200
+		rLoc = 1728;
2201 2201
 		rType = 0;
2202 2202
 		vrLen = 762;
2203 2203
 		vrLoc = 1609;
2204 2204
 	};
  2205
+	1DDC498112CBC43D009924A1 /* PBXTextBookmark */ = {
  2206
+		isa = PBXTextBookmark;
  2207
+		fRef = 1D93C60A11841865003216F7 /* MongoDB.mm */;
  2208
+		name = "MongoDB.mm: 329";
  2209
+		rLen = 0;
  2210
+		rLoc = 10614;
  2211
+		rType = 0;
  2212
+		vrLen = 1534;
  2213
+		vrLoc = 11401;
  2214
+	};
  2215
+	1DDC498212CBC43D009924A1 /* PBXTextBookmark */ = {
  2216
+		isa = PBXTextBookmark;
  2217
+		fRef = 1DD1CA8112C8EFD4007F2909 /* SyntaxDefinition.plist */;
  2218
+		name = "SyntaxDefinition.plist: 14";
  2219
+		rLen = 0;
  2220
+		rLoc = 343;
  2221
+		rType = 0;
  2222
+		vrLen = 740;
  2223
+		vrLoc = 0;
  2224
+	};
  2225
+	1DDC498312CBC43D009924A1 /* PBXTextBookmark */ = {
  2226
+		isa = PBXTextBookmark;
  2227
+		fRef = 1DD1CA8212C8EFD4007F2909 /* SyntaxColorDefaults.plist */;
  2228
+		name = "SyntaxColorDefaults.plist: 39";
  2229
+		rLen = 0;
  2230
+		rLoc = 1016;
  2231
+		rType = 0;
  2232
+		vrLen = 777;
  2233
+		vrLoc = 586;
  2234
+	};
  2235
+	1DDC498412CBC43D009924A1 /* PBXTextBookmark */ = {
  2236
+		isa = PBXTextBookmark;
  2237
+		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
  2238
+		name = "JSON.plist: 19";
  2239
+		rLen = 0;
  2240
+		rLoc = 211;
  2241
+		rType = 0;
  2242
+		vrLen = 753;
  2243
+		vrLoc = 0;
  2244
+	};
  2245
+	1DDC498512CBC43D009924A1 /* PBXTextBookmark */ = {
  2246
+		isa = PBXTextBookmark;
  2247
+		fRef = 1D64100712C8E21C0030AA4C /* UKSyntaxColoredTextViewController.m */;
  2248
+		name = "UKSyntaxColoredTextViewController.m: 844";
  2249
+		rLen = 0;
  2250
+		rLoc = 26885;
  2251
+		rType = 0;
  2252
+		vrLen = 1537;
  2253
+		vrLoc = 26437;
  2254
+	};
  2255
+	1DDC498612CBC43D009924A1 /* PBXTextBookmark */ = {
  2256
+		isa = PBXTextBookmark;
  2257
+		fRef = 1D64100712C8E21C0030AA4C /* UKSyntaxColoredTextViewController.m */;
  2258
+		name = "UKSyntaxColoredTextViewController.m: 844";
  2259
+		rLen = 0;
  2260
+		rLoc = 26885;
  2261
+		rType = 0;
  2262
+		vrLen = 1472;
  2263
+		vrLoc = 26437;
  2264
+	};
  2265
+	1DDC498B12CBC58A009924A1 /* PBXTextBookmark */ = {
  2266
+		isa = PBXTextBookmark;
  2267
+		fRef = 1D64100712C8E21C0030AA4C /* UKSyntaxColoredTextViewController.m */;
  2268
+		name = "UKSyntaxColoredTextViewController.m: 844";
  2269
+		rLen = 0;
  2270
+		rLoc = 26885;
  2271
+		rType = 0;
  2272
+		vrLen = 1548;
  2273
+		vrLoc = 26437;
  2274
+	};
  2275
+	1DDC498C12CBC58A009924A1 /* PBXTextBookmark */ = {
  2276
+		isa = PBXTextBookmark;
  2277
+		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
  2278
+		name = "JSON.plist: 19";
  2279
+		rLen = 0;
  2280
+		rLoc = 211;
  2281
+		rType = 0;
  2282
+		vrLen = 753;
  2283
+		vrLoc = 0;
  2284
+	};
  2285
+	1DDC498D12CBC58A009924A1 /* PBXTextBookmark */ = {
  2286
+		isa = PBXTextBookmark;
  2287
+		fRef = 1DDC486812CB7758009924A1 /* JSON.plist */;
  2288
+		name = "JSON.plist: 35";
  2289
+		rLen = 0;
  2290
+		rLoc = 798;
  2291
+		rType = 0;
  2292
+		vrLen = 660;
  2293
+		vrLoc = 308;
  2294
+	};
2205 2295
 	1DEC7E0312B7A7FF00FC804E /* PBXTextBookmark */ = {
2206 2296
 		isa = PBXTextBookmark;
2207 2297
 		fRef = 1DF96E3911881AED00C35AB8 /* AddCollectionController.h */;
@@ -2810,6 +2900,15 @@
2810 2900
 			1DDC497612CBBE18009924A1 /* PBXTextBookmark */ = 1DDC497612CBBE18009924A1 /* PBXTextBookmark */;
2811 2901
 			1DDC497912CBBEA9009924A1 /* PBXTextBookmark */ = 1DDC497912CBBEA9009924A1 /* PBXTextBookmark */;
2812 2902
 			1DDC497A12CBBEEC009924A1 /* PBXTextBookmark */ = 1DDC497A12CBBEEC009924A1 /* PBXTextBookmark */;
  2903
+			1DDC498112CBC43D009924A1 /* PBXTextBookmark */ = 1DDC498112CBC43D009924A1 /* PBXTextBookmark */;
  2904
+			1DDC498212CBC43D009924A1 /* PBXTextBookmark */ = 1DDC498212CBC43D009924A1 /* PBXTextBookmark */;
  2905
+			1DDC498312CBC43D009924A1 /* PBXTextBookmark */ = 1DDC498312CBC43D009924A1 /* PBXTextBookmark */;
  2906
+			1DDC498412CBC43D009924A1 /* PBXTextBookmark */ = 1DDC498412CBC43D009924A1 /* PBXTextBookmark */;
  2907
+			1DDC498512CBC43D009924A1 /* PBXTextBookmark */ = 1DDC498512CBC43D009924A1 /* PBXTextBookmark */;
  2908
+			1DDC498612CBC43D009924A1 /* PBXTextBookmark */ = 1DDC498612CBC43D009924A1 /* PBXTextBookmark */;
  2909
+			1DDC498B12CBC58A009924A1 /* PBXTextBookmark */ = 1DDC498B12CBC58A009924A1 /* PBXTextBookmark */;
  2910
+			1DDC498C12CBC58A009924A1 /* PBXTextBookmark */ = 1DDC498C12CBC58A009924A1 /* PBXTextBookmark */;
  2911
+			1DDC498D12CBC58A009924A1 /* PBXTextBookmark */ = 1DDC498D12CBC58A009924A1 /* PBXTextBookmark */;
2813 2912
 			1DEC7E0312B7A7FF00FC804E = 1DEC7E0312B7A7FF00FC804E /* PBXTextBookmark */;
2814 2913
 			1DEC7E0412B7A7FF00FC804E = 1DEC7E0412B7A7FF00FC804E /* PBXTextBookmark */;
2815 2914
 			1DEC7E4412B7B5B600FC804E = 1DEC7E4412B7B5B600FC804E /* PBXTextBookmark */;
28  Syntax Definitions/JSON.plist
@@ -12,24 +12,6 @@
12 12
 				<integer>1</integer>
13 13
 			</array>
14 14
 			<key>End</key>
15  
-			<string>}</string>
16  
-			<key>EscapeChar</key>
17  
-			<string></string>
18  
-			<key>Name</key>
19  
-			<string>JSONStrings</string>
20  
-			<key>Start</key>
21  
-			<string>{</string>
22  
-			<key>Type</key>
23  
-			<string>String</string>
24  
-		</dict>
25  
-        <dict>
26  
-			<key>Color</key>
27  
-			<array>
28  
-				<integer>1</integer>
29  
-				<integer>1</integer>
30  
-				<integer>1</integer>
31  
-			</array>
32  
-			<key>End</key>
33 15
 			<string>"</string>
34 16
 			<key>EscapeChar</key>
35 17
 			<string></string>
@@ -43,19 +25,17 @@
43 25
         <dict>
44 26
 			<key>Color</key>
45 27
 			<array>
46  
-				<integer>1</integer>
47 28
 				<integer>0</integer>
  29
+				<integer>1</integer>
48 30
 				<integer>0</integer>
49 31
 			</array>
50 32
 			<key>Keywords</key>
51 33
 			<array>
52  
-				<string>:null</string>
53  
-				<string>: null</string>
54  
-				<string>:false</string>
55  
-				<string>: false</string>
  34
+				<string>:true</string>
  35
+				<string>: true</string>
56 36
 			</array>
57 37
 			<key>Name</key>
58  
-			<string>IdentifiersFalse</string>
  38
+			<string>IdentifiersTrue</string>
59 39
 			<key>Type</key>
60 40
 			<string>Keywords</string>
61 41
 		</dict>
7  UKSyntaxColoredTextViewController.m
@@ -839,6 +839,13 @@ -(void)		recolorRange: (NSRange)range
839 839
 		NSDictionary*				vStyles = [self defaultTextAttributes];
840 840
 		NSUserDefaults*				vPrefs = [NSUserDefaults standardUserDefaults];
841 841
         
  842
+        NSDictionary*		dStyles = [NSDictionary dictionaryWithObjectsAndKeys:
  843
+                                       [NSColor whiteColor], NSForegroundColorAttributeName,
  844
+                                       @"JSONStrings", TD_SYNTAX_COLORING_MODE_ATTR,
  845
+                                       nil];
  846
+        
  847
+        [vString addAttributes: dStyles range: NSMakeRange( 0, [vString length] )];
  848
+        
842 849
 		while( (vCurrComponent = [vComponentsEnny nextObject]) )
843 850
 		{
844 851
 			NSString*   vComponentType = [vCurrComponent objectForKey: @"Type"];

0 notes on commit 2ee871d

Please sign in to comment.
Something went wrong with that request. Please try again.