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

Unified Diff: dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 64033002: Version 0.8.10.8 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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
Index: dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
===================================================================
--- dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart (revision 30037)
+++ dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart (working copy)
@@ -1186,12 +1186,13 @@
subtypes.sort((x, y) => x.simpleName.compareTo(y.simpleName));
// Show the chain of superclasses.
- if (!type.superclass.isObject) {
+ var superclass = getSuperclass(type);
+ if (!superclass.isObject) {
final supertypes = [];
- var thisType = type.superclass;
+ var thisType = superclass;
do {
supertypes.add(thisType);
- thisType = thisType.superclass;
+ thisType = getSuperclass(thisType);
} while (!thisType.isObject);
writeln('<h3>Extends</h3>');
@@ -1207,7 +1208,8 @@
}
listTypes(subtypes, 'Subclasses');
- listTypes(type.superinterfaces, 'Implements');
+ listTypes(getAppliedMixins(type), 'Mixins');
+ listTypes(getExplicitInterfaces(type), 'Implements');
}
/**
@@ -1572,9 +1574,7 @@
writeln('</h4>');
if (inherited) {
- write('<div class="inherited-from">inherited from ');
- annotateType(host, member.owner);
- write('</div>');
+ docInherited(host, member.owner);
}
writeln('<div class="doc">');
@@ -1589,6 +1589,21 @@
_currentMember = null;
}
+ /**
+ * Annotate a member as inherited or mixed in from [owner].
+ */
+ void docInherited(ContainerMirror host, ClassMirror owner) {
+ if (isMixinApplication(owner)) {
+ write('<div class="inherited-from">mixed in from ');
+ annotateType(host, owner.mixin);
+ write('</div>');
+ } else {
+ write('<div class="inherited-from">inherited from ');
+ annotateType(host, owner);
+ write('</div>');
+ }
+ }
+
void docField(ContainerMirror host, VariableMirror field,
{bool asGetter: false, bool asSetter: false}) {
if (asGetter) {
@@ -1654,9 +1669,7 @@
''');
if (inherited) {
- write('<div class="inherited-from">inherited from ');
- annotateType(host, getter.owner);
- write('</div>');
+ docInherited(host, getter.owner);
}
DocComment comment = getMemberComment(getter);
@@ -1779,6 +1792,9 @@
}
}
if (comment == null) return null;
+ if (isMixinApplication(inheritedFrom)) {
+ inheritedFrom = inheritedFrom.mixin;
+ }
return new DocComment(comment, inheritedFrom, dartdocSyntaxes,
dartdocResolver);
}
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | dart/sdk/lib/_internal/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698