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

Unified Diff: pkg/docgen/lib/docgen.dart

Issue 141083002: Fixed up some inheritance chains and improved constructor output (to be fully qualified). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index c6c0215422bd0485049990f1ac2c795a0dc52b68..a5270b5178dd8a9a1f1f600e266f5d1f253d3824 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -1442,8 +1442,8 @@ class Class extends Indexable implements Comparable {
/// Returns a list of all the parent classes.
List<Class> parentChain() {
+ // TODO(efortuna): Seems like we can get rid of this method.
var parent = superclass == null ? [] : [superclass];
- parent.addAll(interfaces);
return parent;
}
@@ -1732,6 +1732,9 @@ class Method extends Indexable {
String get packagePrefix => owner.packagePrefix;
+ Method get originallyInheritedFrom => methodInheritedFrom == null ?
+ this : methodInheritedFrom.originallyInheritedFrom;
+
markdown.Node fixReferenceWithScope(String name) => fixReference(name);
/// Look for the specified name starting with the current member, and
@@ -1765,8 +1768,7 @@ class Method extends Indexable {
if ((mirror as MethodMirror).isConstructor) {
// We name constructors specially -- including the class name again and a
// "-" to separate the constructor from its name (if any).
- return '${mirror.owner.simpleName.replaceAll(".", "_")}.'
- '${mirror.owner.simpleName}-${mirror.simpleName}';
+ return '${owner.docName}.${mirror.owner.simpleName}-${mirror.simpleName}';
}
return super.docName;
}
@@ -1778,7 +1780,7 @@ class Method extends Indexable {
comment = inheritedMethod._commentToHtml(this);
_unresolvedComment = inheritedMethod._unresolvedComment;
commentInheritedFrom = inheritedMethod.commentInheritedFrom == '' ?
- inheritedMethod.mirror.qualifiedName :
+ new DummyMirror(inheritedMethod.mirror).docName :
inheritedMethod.commentInheritedFrom;
}
@@ -1791,7 +1793,7 @@ class Method extends Indexable {
commentInheritedFrom == methodInheritedFrom.docName ? ''
: commentInheritedFrom),
'inheritedFrom': (methodInheritedFrom == null? '' :
- methodInheritedFrom.docName),
+ originallyInheritedFrom.docName),
'static': isStatic.toString(),
'abstract': isAbstract.toString(),
'constant': isConst.toString(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698