| Index: sdk/lib/_internal/dartdoc/lib/dartdoc.dart
|
| diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
|
| index 02748759b184659a1ffdc0ffaff37190aeb9138c..21f5d5eea316f7e49f3e15e7f5246a70dd9c06bf 100644
|
| --- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
|
| +++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
|
| @@ -975,7 +975,6 @@ class Dartdoc {
|
| }
|
| _totalLibraries++;
|
| _currentLibrary = library;
|
| - _currentType = null;
|
|
|
| startFile(libraryUrl(library));
|
| writeHeader('${displayName(library)} Library',
|
| @@ -1032,6 +1031,8 @@ class Dartdoc {
|
|
|
| docType(type);
|
| }
|
| +
|
| + _currentLibrary = null;
|
| }
|
|
|
| void docTypes(List types, String header) {
|
| @@ -1102,6 +1103,8 @@ class Dartdoc {
|
| writeTypeFooter();
|
| writeFooter();
|
| endFile();
|
| +
|
| + _currentType = null;
|
| }
|
|
|
| /** Override this to write additional content at the end of a type's page. */
|
| @@ -1575,6 +1578,8 @@ class Dartdoc {
|
| writeln('</div>');
|
|
|
| writeln('</div>');
|
| +
|
| + _currentMember = null;
|
| }
|
|
|
| void docField(ContainerMirror host, VariableMirror field,
|
| @@ -1660,6 +1665,8 @@ class Dartdoc {
|
| writeln('</div>');
|
|
|
| writeln('</div>');
|
| +
|
| + _currentMember = null;
|
| }
|
|
|
| void docParamList(ContainerMirror enclosingType,
|
| @@ -2012,6 +2019,23 @@ class Dartdoc {
|
| return anchor;
|
| }
|
|
|
| + DeclarationMirror declaration = currentMember;
|
| + if (declaration == null) declaration = currentType;
|
| + if (declaration == null) declaration = currentLibrary;
|
| + if (declaration != null) {
|
| + declaration = lookupQualifiedInScope(declaration, name);
|
| + }
|
| +
|
| + if (declaration != null) {
|
| + if (declaration is TypeVariableMirror) {
|
| + return makeLink(typeUrl(declaration.owner));
|
| + } if (declaration is TypeMirror) {
|
| + return makeLink(typeUrl(declaration));
|
| + } else if (declaration is MethodMirror) {
|
| + return makeLink(memberUrl(declaration));
|
| + }
|
| + }
|
| +
|
| // See if it's a parameter of the current method.
|
| if (currentMember is MethodMirror) {
|
| for (final parameter in currentMember.parameters) {
|
|
|