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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * **docgen** is a tool for creating machine readable representations of Dart 6 * **docgen** is a tool for creating machine readable representations of Dart
7 * code metadata, including: classes, members, comments and annotations. 7 * code metadata, including: classes, members, comments and annotations.
8 * 8 *
9 * docgen is run on a `.dart` file or a directory containing `.dart` files. 9 * docgen is run on a `.dart` file or a directory containing `.dart` files.
10 * 10 *
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 /** 271 /**
272 * Returns true if a library name starts with an underscore, and false 272 * Returns true if a library name starts with an underscore, and false
273 * otherwise. 273 * otherwise.
274 * 274 *
275 * An example that starts with _ is _js_helper. 275 * An example that starts with _ is _js_helper.
276 * An example that contains ._ is dart._collection.dev 276 * An example that contains ._ is dart._collection.dev
277 */ 277 */
278 // This is because LibraryMirror.isPrivate returns `false` all the time. 278 // This is because LibraryMirror.isPrivate returns `false` all the time.
279 bool _isLibraryPrivate(LibraryMirror mirror) { 279 bool _isLibraryPrivate(LibraryMirror mirror) {
280 if (mirror.simpleName.startsWith('_') || mirror.simpleName.contains('._')) { 280 var sdkLibrary = LIBRARIES[mirror.simpleName];
281 if (sdkLibrary != null) {
282 return !sdkLibrary.documented;
283 } else if (mirror.simpleName.startsWith('_') ||
284 mirror.simpleName.contains('._')) {
281 return true; 285 return true;
282 } 286 }
283 return false; 287 return false;
284 } 288 }
285 289
286 /** 290 /**
287 * A declaration is private if itself is private, or the owner is private. 291 * A declaration is private if itself is private, or the owner is private.
288 */ 292 */
289 // Issue(12202) - A declaration is public even if it's owner is private. 293 // Issue(12202) - A declaration is public even if it's owner is private.
290 bool _isHidden(DeclarationMirror mirror) { 294 bool _isHidden(DeclarationMirror mirror) {
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 String qualifiedName; 1080 String qualifiedName;
1077 List<String> parameters; 1081 List<String> parameters;
1078 1082
1079 Annotation(this.qualifiedName, this.parameters); 1083 Annotation(this.qualifiedName, this.parameters);
1080 1084
1081 Map toMap() => { 1085 Map toMap() => {
1082 'name': qualifiedName, 1086 'name': qualifiedName,
1083 'parameters': parameters 1087 'parameters': parameters
1084 }; 1088 };
1085 } 1089 }
OLDNEW
« 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