Chromium Code Reviews| Index: utils/apidoc/apidoc.dart |
| diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart |
| index a4fbe43c5b1433316b74d7b5b176b410ed0d72aa..2a3035cad22237644cac2e41620dfb677d74df00 100644 |
| --- a/utils/apidoc/apidoc.dart |
| +++ b/utils/apidoc/apidoc.dart |
| @@ -17,12 +17,14 @@ library apidoc; |
| import 'dart:async'; |
| import 'dart:io'; |
| import 'dart:json' as json; |
| +import 'dart:uri'; |
| import 'html_diff.dart'; |
| // TODO(rnystrom): Use "package:" URL (#4968). |
| import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; |
| import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart'; |
| +import '../../sdk/lib/_internal/compiler/implementation/filenames.dart'; |
| import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; |
| import '../../sdk/lib/_internal/libraries.dart'; |
| @@ -99,7 +101,7 @@ void main() { |
| // TODO(amouravski): move HtmlDiff inside of the future chain below to re-use |
| // the MirrorSystem already analyzed. |
| _diff = new HtmlDiff(printWarnings:false); |
| - Future htmlDiff = _diff.run(libPath); |
| + Future htmlDiff = _diff.run(currentDirectory.resolve(libPath.toString())); |
| // TODO(johnniwinther): Libraries for the compilation seem to be more like |
| // URIs. Perhaps Path should have a toURI() method. |
| @@ -349,7 +351,7 @@ class Apidoc extends Dartdoc { |
| } |
| var typeString = ''; |
| - if (HTML_LIBRARY_NAMES.contains(displayName(type.library))) { |
| + if (HTML_LIBRARY_URIS.contains(type.library.uri)) { |
| // If it's an HTML type, try to map it to a base DOM type so we can find |
| // the MDN docs. |
| final domTypes = _diff.htmlTypesToDom[type.qualifiedName]; |
| @@ -386,7 +388,7 @@ class Apidoc extends Dartdoc { |
| MdnComment includeMdnMemberComment(MemberMirror member) { |
| var library = findLibrary(member); |
| var memberString = ''; |
| - if (HTML_LIBRARY_NAMES.contains(displayName(library))) { |
| + if (HTML_LIBRARY_URIS.contains(library.uri)) { |
| // If it's an HTML type, try to map it to a DOM type name so we can find |
| // the MDN docs. |
| final domMembers = _diff.htmlToDom[member.qualifiedName]; |
| @@ -439,7 +441,7 @@ class Apidoc extends Dartdoc { |
| String _linkMember(MemberMirror member) { |
| final typeName = member.owner.simpleName; |
| var memberName = '$typeName.${member.simpleName}'; |
| - if (member is MethodMirror && (member.isConstructor || member.isFactory)) { |
|
Johnni Winther
2013/04/08 13:22:33
isFactory should have been isFactoryConstructor wh
|
| + if (member is MethodMirror && member.isConstructor) { |
| final separator = member.constructorName == '' ? '' : '.'; |
| memberName = 'new $typeName$separator${member.constructorName}'; |
| } |