OLD | NEW |
1 /** | 1 /** |
2 * Creates database.html, examples.html, and obsolete.html. | 2 * Creates database.html, examples.html, and obsolete.html. |
3 */ | 3 */ |
4 | 4 |
5 #library("prettyPrint"); | 5 #library("prettyPrint"); |
6 | 6 |
7 #import("dart:io"); | 7 #import("dart:io"); |
8 #import("dart:json"); | 8 #import("dart:json"); |
9 #import("util.dart"); | 9 #import("util.dart"); |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 int addMissing(StringBuffer sb, String type, Map members) { | 22 int addMissing(StringBuffer sb, String type, Map members) { |
23 int total = 0; | 23 int total = 0; |
24 /** | 24 /** |
25 * Add all missing members to the string output and return the number of | 25 * Add all missing members to the string output and return the number of |
26 * missing members. | 26 * missing members. |
27 */ | 27 */ |
28 void addMissingHelper(String propType) { | 28 void addMissingHelper(String propType) { |
29 Map expected = allProps[type][propType]; | 29 Map expected = allProps[type][propType]; |
30 if (expected != null) { | 30 if (expected != null) { |
31 for(final name in sortStringCollection(expected.getKeys())) { | 31 for(final name in sortStringCollection(expected.keys)) { |
32 if (!members.containsKey(name)) { | 32 if (!members.containsKey(name)) { |
33 total++; | 33 total++; |
34 sb.add(""" | 34 sb.add(""" |
35 <tr class="missing"> | 35 <tr class="missing"> |
36 <td>$name</td> | 36 <td>$name</td> |
37 <td></td> | 37 <td></td> |
38 <td>Could not find documentation for $propType</td> | 38 <td>Could not find documentation for $propType</td> |
39 </tr> | 39 </tr> |
40 """); | 40 """); |
41 } | 41 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 145 } |
146 </style> | 146 </style> |
147 <title>Doc Dump</title> | 147 <title>Doc Dump</title> |
148 </head> | 148 </head> |
149 <body> | 149 <body> |
150 <h1>Doc Dump</h1> | 150 <h1>Doc Dump</h1> |
151 <ul> | 151 <ul> |
152 <li><a href="#dart_summary">Summary</a></li> | 152 <li><a href="#dart_summary">Summary</a></li> |
153 </li> | 153 </li> |
154 """); | 154 """); |
155 for (String type in sortStringCollection(database.getKeys())) { | 155 for (String type in sortStringCollection(database.keys)) { |
156 final entry = database[type]; | 156 final entry = database[type]; |
157 if (entry == null || entry.containsKey('skipped')) { | 157 if (entry == null || entry.containsKey('skipped')) { |
158 numSkipped++; | 158 numSkipped++; |
159 sbSkipped.add(""" | 159 sbSkipped.add(""" |
160 <li id="$type"> | 160 <li id="$type"> |
161 <a target="_blank" href="http://www.google.com/cse?cx=01719397256594783026
6%3Awpqsk6dy6ee&ie=UTF-8&q=$type"> | 161 <a target="_blank" href="http://www.google.com/cse?cx=01719397256594783026
6%3Awpqsk6dy6ee&ie=UTF-8&q=$type"> |
162 $type | 162 $type |
163 </a> | 163 </a> |
164 -- | 164 -- |
165 Title: ${entry == null ? "???" : entry["title"]} -- Issue: | 165 Title: ${entry == null ? "???" : entry["title"]} -- Issue: |
(...skipping 14 matching lines...) Expand all Loading... |
180 Map members = getMembersMap(entry); | 180 Map members = getMembersMap(entry); |
181 sbMembers.add(""" | 181 sbMembers.add(""" |
182 <div class="members"> | 182 <div class="members"> |
183 <h3><span class="debug">[dart]</span> Members</h3> | 183 <h3><span class="debug">[dart]</span> Members</h3> |
184 <table> | 184 <table> |
185 <tbody> | 185 <tbody> |
186 <tr> | 186 <tr> |
187 <th>Name</th><th>Description</th><th>IDL</th><th>Status</th> | 187 <th>Name</th><th>Description</th><th>IDL</th><th>Status</th> |
188 </tr> | 188 </tr> |
189 """); | 189 """); |
190 for (String name in sortStringCollection(members.getKeys())) { | 190 for (String name in sortStringCollection(members.keys)) { |
191 Map memberData = members[name]; | 191 Map memberData = members[name]; |
192 bool unknown = !hasAny(type, name); | 192 bool unknown = !hasAny(type, name); |
193 StringBuffer classes = new StringBuffer(); | 193 StringBuffer classes = new StringBuffer(); |
194 if (unknown) classes.add("unknown "); | 194 if (unknown) classes.add("unknown "); |
195 if (unknown) { | 195 if (unknown) { |
196 numExtraMethods++; | 196 numExtraMethods++; |
197 } else { | 197 } else { |
198 numFoundMethods++; | 198 numFoundMethods++; |
199 } | 199 } |
200 | 200 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 if (sbExamples.length > 0) { | 287 if (sbExamples.length > 0) { |
288 sbAllExamples.add(""" | 288 sbAllExamples.add(""" |
289 <div class='type' id="$type"> | 289 <div class='type' id="$type"> |
290 <a href='${entry['srcUrl']}'>$title</a> | 290 <a href='${entry['srcUrl']}'>$title</a> |
291 $sbExamples | 291 $sbExamples |
292 </div> | 292 </div> |
293 """); | 293 """); |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
297 for (String type in sortStringCollection(allProps.getKeys())) { | 297 for (String type in sortStringCollection(allProps.keys)) { |
298 if (!matchedTypes.contains(type) && | 298 if (!matchedTypes.contains(type) && |
299 !database.containsKey(type)) { | 299 !database.containsKey(type)) { |
300 numSkipped++; | 300 numSkipped++; |
301 sbSkipped.add(""" | 301 sbSkipped.add(""" |
302 <li class="unknown" id="$type"> | 302 <li class="unknown" id="$type"> |
303 <a target="_blank" href="http://www.google.com/cse?cx=01719397256594783026
6%3Awpqsk6dy6ee&ie=UTF-8&q=$type"> | 303 <a target="_blank" href="http://www.google.com/cse?cx=01719397256594783026
6%3Awpqsk6dy6ee&ie=UTF-8&q=$type"> |
304 $type | 304 $type |
305 </a> | 305 </a> |
306 </li> | 306 </li> |
307 """); | 307 """); |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 sb.add(""" | 311 sb.add(""" |
312 <div id="#dart_summary"> | 312 <div id="#dart_summary"> |
313 <h2>Summary</h2> | 313 <h2>Summary</h2> |
314 <h3> | 314 <h3> |
315 Generated docs for $numGen classes out of a possible | 315 Generated docs for $numGen classes out of a possible |
316 ${allProps.getKeys().length} | 316 ${allProps.keys.length} |
317 </h3> | 317 </h3> |
318 <h3>Found documentation for $numFoundMethods methods listed in WebKit</h3> | 318 <h3>Found documentation for $numFoundMethods methods listed in WebKit</h3> |
319 <h3> | 319 <h3> |
320 Found documentation for $numExtraMethods methods not listed in WebKit | 320 Found documentation for $numExtraMethods methods not listed in WebKit |
321 </h3> | 321 </h3> |
322 <h3> | 322 <h3> |
323 Unable to find documentation for $numMissingMethods methods present in | 323 Unable to find documentation for $numMissingMethods methods present in |
324 WebKit | 324 WebKit |
325 </h3> | 325 </h3> |
326 <h3> | 326 <h3> |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 <th>IDL</th> | 421 <th>IDL</th> |
422 <th>Status</th> | 422 <th>Status</th> |
423 </tr> | 423 </tr> |
424 $sbObsolete | 424 $sbObsolete |
425 </tbody> | 425 </tbody> |
426 </table> | 426 </table> |
427 </body> | 427 </body> |
428 </html> | 428 </html> |
429 """); | 429 """); |
430 } | 430 } |
OLD | NEW |