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

Unified Diff: pkg/docgen/lib/docgen.dart

Issue 23031004: Hides libraries that should not be documented. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index b2568dff81b442f8789ac0500330b753377c6037..bca15b6f0def7788d96289be2171d5bb9d8442c0 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -277,7 +277,11 @@ void _writeIndexableToFile(Indexable result, bool outputToYaml) {
*/
// This is because LibraryMirror.isPrivate returns `false` all the time.
bool _isLibraryPrivate(LibraryMirror mirror) {
- if (mirror.simpleName.startsWith('_') || mirror.simpleName.contains('._')) {
+ var sdkLibrary = LIBRARIES[mirror.simpleName];
+ if (sdkLibrary != null) {
+ return !sdkLibrary.documented;
+ } else if (mirror.simpleName.startsWith('_') ||
+ mirror.simpleName.contains('._')) {
return true;
}
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698