| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * This generates the reference documentation for the core libraries that come | 6 * This generates the reference documentation for the core libraries that come |
| 7 * with dart. It is built on top of dartdoc, which is a general-purpose library | 7 * with dart. It is built on top of dartdoc, which is a general-purpose library |
| 8 * for generating docs from any Dart code. This library extends that to include | 8 * for generating docs from any Dart code. This library extends that to include |
| 9 * additional information and styling specific to our standard library. | 9 * additional information and styling specific to our standard library. |
| 10 * | 10 * |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 doc.libPath); | 88 doc.libPath); |
| 89 print('Processing handwritten HTML documentation...'); | 89 print('Processing handwritten HTML documentation...'); |
| 90 | 90 |
| 91 // Process libraries. | 91 // Process libraries. |
| 92 | 92 |
| 93 // TODO(johnniwinther): Libraries for the compilation seem to be more like | 93 // TODO(johnniwinther): Libraries for the compilation seem to be more like |
| 94 // URIs. Perhaps Path should have a toURI() method. | 94 // URIs. Perhaps Path should have a toURI() method. |
| 95 // Add all of the core libraries. | 95 // Add all of the core libraries. |
| 96 final apidocLibraries = <Path>[]; | 96 final apidocLibraries = <Path>[]; |
| 97 LIBRARIES.forEach((String name, LibraryInfo info) { | 97 LIBRARIES.forEach((String name, LibraryInfo info) { |
| 98 if (info.isDart2JsLibrary() && | 98 if (info.documented) { |
| 99 info.category != "Internal" && | |
| 100 info.documented) { | |
| 101 apidocLibraries.add(new Path('dart:$name')); | 99 apidocLibraries.add(new Path('dart:$name')); |
| 102 } | 100 } |
| 103 }); | 101 }); |
| 104 | 102 |
| 105 final includedLibraries = <String>[]; | 103 final includedLibraries = <String>[]; |
| 106 var lister = new Directory.fromPath( | 104 var lister = new Directory.fromPath( |
| 107 doc.scriptDir.append('../../pkg')).list(); | 105 doc.scriptDir.append('../../pkg')).list(); |
| 108 lister.onDir = (dirPath) { | 106 lister.onDir = (dirPath) { |
| 109 var path = new Path.fromNative(dirPath); | 107 var path = new Path.fromNative(dirPath); |
| 110 var libname = path.filename; | 108 var libname = path.filename; |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 final typeName = member.surroundingDeclaration.simpleName; | 526 final typeName = member.surroundingDeclaration.simpleName; |
| 529 var memberName = '$typeName.${member.simpleName}'; | 527 var memberName = '$typeName.${member.simpleName}'; |
| 530 if (member is MethodMirror && (member.isConstructor || member.isFactory)) { | 528 if (member is MethodMirror && (member.isConstructor || member.isFactory)) { |
| 531 final separator = member.constructorName == '' ? '' : '.'; | 529 final separator = member.constructorName == '' ? '' : '.'; |
| 532 memberName = 'new $typeName$separator${member.constructorName}'; | 530 memberName = 'new $typeName$separator${member.constructorName}'; |
| 533 } | 531 } |
| 534 | 532 |
| 535 return a(memberUrl(member), memberName); | 533 return a(memberUrl(member), memberName); |
| 536 } | 534 } |
| 537 } | 535 } |
| OLD | NEW |