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

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

Issue 245673002: pkg/docgen: a bunch of cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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
« no previous file with comments | « pkg/docgen/lib/src/models/indexable.dart ('k') | pkg/docgen/lib/src/models/method.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/models/library.dart
diff --git a/pkg/docgen/lib/src/models/library.dart b/pkg/docgen/lib/src/models/library.dart
index 996b129c199838dd865d0df540eae00126717fcb..826536fb1bfe86574e392c8774d3a4e22445c330 100644
--- a/pkg/docgen/lib/src/models/library.dart
+++ b/pkg/docgen/lib/src/models/library.dart
@@ -38,6 +38,8 @@ class Library extends Indexable {
bool _hasBeenCheckedForPackage = false;
String packageIntro;
+ Indexable get owner => const _LibraryOwner();
+
Library get owningLibrary => this;
/// Returns the [Library] for the given [mirror] if it has already been
@@ -145,9 +147,7 @@ class Library extends Indexable {
String get name => docName;
- String get docName {
- return dart2js_util.qualifiedNameOf(mirror).replaceAll('.', '-');
- }
+ String get docName => getLibraryDocName(mirror);
/// Generates a map describing the [Library] object.
Map toMap() => {
@@ -171,3 +171,20 @@ class Library extends Indexable {
bool isValidMirror(DeclarationMirror mirror) => mirror is LibraryMirror;
}
+
+/// Dummy implementation of Indexable to represent the owner of a Library.
+class _LibraryOwner implements Indexable {
+ const _LibraryOwner();
+
+ String get docName => '';
+
+ bool get isPrivate => false;
+
+ Indexable get owner => null;
+
+ // This is a known incomplete implementation of Indexable
+ // overriding noSuchMethod to remove static warnings
+ noSuchMethod(Invocation invocation) {
+ throw new UnimplementedError(invocation.memberName.toString());
+ }
+}
« no previous file with comments | « pkg/docgen/lib/src/models/indexable.dart ('k') | pkg/docgen/lib/src/models/method.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698