Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: utils/apidoc/apidoc.dart

Issue 13797002: Change MirrorSystem.libraries to Map<Uri, String> (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/mirrors_test.dart ('k') | utils/apidoc/html_diff.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/apidoc.dart
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index 233f9be67e83063eeccc306652e02d97666999f4..8979ddd9e22e969e596a73f60685650a13eb8977 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -24,6 +24,7 @@ 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';
import 'package:pathos/path.dart' as pathos;
@@ -101,7 +102,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.
@@ -353,7 +354,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];
@@ -390,7 +391,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];
@@ -443,7 +444,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)) {
+ if (member is MethodMirror && member.isConstructor) {
final separator = member.constructorName == '' ? '' : '.';
memberName = 'new $typeName$separator${member.constructorName}';
}
« no previous file with comments | « tests/compiler/dart2js/mirrors_test.dart ('k') | utils/apidoc/html_diff.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698