| 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 12 matching lines...) Expand all Loading... |
| 23 #import('../../pkg/dartdoc/lib/mirrors_util.dart'); | 23 #import('../../pkg/dartdoc/lib/mirrors_util.dart'); |
| 24 #import('../../pkg/dartdoc/lib/dartdoc.dart', prefix: 'doc'); | 24 #import('../../pkg/dartdoc/lib/dartdoc.dart', prefix: 'doc'); |
| 25 #import('../../lib/_internal/libraries.dart'); | 25 #import('../../lib/_internal/libraries.dart'); |
| 26 | 26 |
| 27 HtmlDiff _diff; | 27 HtmlDiff _diff; |
| 28 | 28 |
| 29 void main() { | 29 void main() { |
| 30 final args = new Options().arguments; | 30 final args = new Options().arguments; |
| 31 | 31 |
| 32 int mode = doc.MODE_STATIC; | 32 int mode = doc.MODE_STATIC; |
| 33 Path outputDir = const Path('docs'); | 33 Path outputDir = new Path('docs'); |
| 34 bool generateAppCache = false; | 34 bool generateAppCache = false; |
| 35 | 35 |
| 36 // Parse the command-line arguments. | 36 // Parse the command-line arguments. |
| 37 for (int i = 0; i < args.length; i++) { | 37 for (int i = 0; i < args.length; i++) { |
| 38 final arg = args[i]; | 38 final arg = args[i]; |
| 39 | 39 |
| 40 switch (arg) { | 40 switch (arg) { |
| 41 case '--mode=static': | 41 case '--mode=static': |
| 42 mode = doc.MODE_STATIC; | 42 mode = doc.MODE_STATIC; |
| 43 break; | 43 break; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 final typeName = member.surroundingDeclaration.simpleName; | 558 final typeName = member.surroundingDeclaration.simpleName; |
| 559 var memberName = '$typeName.${member.simpleName}'; | 559 var memberName = '$typeName.${member.simpleName}'; |
| 560 if (member is MethodMirror && (member.isConstructor || member.isFactory)) { | 560 if (member is MethodMirror && (member.isConstructor || member.isFactory)) { |
| 561 final separator = member.constructorName == '' ? '' : '.'; | 561 final separator = member.constructorName == '' ? '' : '.'; |
| 562 memberName = 'new $typeName$separator${member.constructorName}'; | 562 memberName = 'new $typeName$separator${member.constructorName}'; |
| 563 } | 563 } |
| 564 | 564 |
| 565 return a(memberUrl(member), memberName); | 565 return a(memberUrl(member), memberName); |
| 566 } | 566 } |
| 567 } | 567 } |
| OLD | NEW |