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

Unified Diff: utils/dartdoc/dartdoc.dart

Issue 9318013: Fix build break in dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « no previous file | utils/dartdoc/files.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdoc/dartdoc.dart
diff --git a/utils/dartdoc/dartdoc.dart b/utils/dartdoc/dartdoc.dart
index 56c941465158fd305a5b956d6a8c596e6bde664c..2488c44860739eee3fa666d08f9a3186c98dd84d 100644
--- a/utils/dartdoc/dartdoc.dart
+++ b/utils/dartdoc/dartdoc.dart
@@ -904,7 +904,8 @@ class Dartdoc {
}
/** Gets the URL for the documentation for [type]. */
- String typeUrl(Type type) {
+ typeUrl(Type type) {
nweiz 2012/01/31 23:31:25 Why was the type removed?
Bob Nystrom 2012/01/31 23:32:38 Copy/paste error. I'll fix.
+ if (type.isTop) return '${sanitize(type.library.name)}.html';
// Always get the generic type to strip off any type parameters or
// arguments. If the type isn't generic, genericType returns `this`, so it
// works for non-generic types too.
@@ -912,8 +913,11 @@ class Dartdoc {
}
/** Gets the URL for the documentation for [member]. */
- String memberUrl(Member member) {
- return '${typeUrl(member.declaringType)}#${member.name}';
+ memberUrl(Member member) {
nweiz 2012/01/31 23:31:25 See above.
Bob Nystrom 2012/01/31 23:32:38 Ditto.
+ final typeUrl = typeUrl(member.declaringType);
+ if (!member.isConstructor) return '$typeUrl#${member.name}';
+ if (member.constructorName == '') return '$typeUrl#new:${member.name}';
+ return '$typeUrl#new:${member.name}.${member.constructorName}';
}
/** Gets the anchor id for the document for [member]. */
« no previous file with comments | « no previous file | utils/dartdoc/files.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698