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

Unified Diff: pkg/docgen/lib/src/models/owned_indexable.dart

Issue 243483005: pkg/docgen: fixed type references within typedef doc comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 years, 8 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
Index: pkg/docgen/lib/src/models/owned_indexable.dart
diff --git a/pkg/docgen/lib/src/models/owned_indexable.dart b/pkg/docgen/lib/src/models/owned_indexable.dart
index 1df771e3c8d60212ff1a89239addd1826bf707cd..ea3335deada4b83946a629b7df2b6a57003c497a 100644
--- a/pkg/docgen/lib/src/models/owned_indexable.dart
+++ b/pkg/docgen/lib/src/models/owned_indexable.dart
@@ -12,6 +12,7 @@ import '../mdn.dart';
import '../package_helpers.dart';
import 'annotation.dart';
+import 'dummy_mirror.dart';
import 'indexable.dart';
import 'model_helpers.dart';
@@ -48,4 +49,22 @@ abstract class OwnedIndexable<TMirror extends DeclarationMirror>
}
String get packagePrefix => owner.packagePrefix;
+
+ String findElementInScope(String name) {
kevmoo 2014/04/21 17:52:15 This is blindly moved from Variable. It is now sha
+ var lookupFunc = determineLookupFunc(name);
+ var result = lookupFunc(mirror, name);
+ if (result != null) {
+ result = getDocgenObject(result);
+ if (result is DummyMirror) return packagePrefix + result.docName;
+ return result.packagePrefix + result.docName;
+ }
+
+ if (owner != null) {
+ var result = owner.findElementInScope(name);
+ if (result != null) {
+ return result;
+ }
+ }
+ return super.findElementInScope(name);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698