Chromium Code Reviews| Index: pkg/docgen/lib/docgen.dart |
| diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart |
| index 76cb0bb6299763dfc982b338b18e3a770246973f..182a4fc54ddc68b8f6245dc4ca65450014077374 100644 |
| --- a/pkg/docgen/lib/docgen.dart |
| +++ b/pkg/docgen/lib/docgen.dart |
| @@ -278,7 +278,21 @@ String _getComment(DeclarationMirror mirror) { |
| // on scope once layout of viewer is finished. |
|
Tate Mandel
2013/07/09 16:43:26
Remove this TODO.
janicejl
2013/07/09 19:49:21
Done.
|
| markdown.Node fixReference(String name, LibraryMirror currentLibrary, |
| ClassMirror currentClass, MemberMirror currentMember) { |
| - return new markdown.Element.text('code', name); |
| + |
| + var reference; |
| + var libraryScope = currentLibrary.lookupInScope(name); |
|
Tate Mandel
2013/07/09 16:43:26
I feel as though it should go the other way around
janicejl
2013/07/09 19:49:21
Done.
|
| + if (libraryScope != null) reference = libraryScope.qualifiedName; |
| + else { |
| + var classScope = currentClass == null ? |
| + null : currentClass.lookupInScope(name); |
| + if (classScope != null) reference = classScope.qualifiedName; |
| + else { |
| + var memberScope = currentMember == null ? |
| + null : currentMember.lookupInScope(name); |
| + reference = memberScope != null ? memberScope.qualifiedname : name; |
| + } |
| + } |
| + return new markdown.Element.text('code', reference); |
|
Tate Mandel
2013/07/09 16:43:26
We probably don't want this as a <code> tag anymor
janicejl
2013/07/09 19:49:21
Done.
|
| } |
| /** |