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

Side by Side Diff: pkg/docgen/lib/src/models/model_helpers.dart

Issue 247973004: pkg/docgen: fix type warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/docgen/lib/src/models/indexable.dart ('k') | pkg/pkg.status » ('j') | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library docgen.model_helpers; 5 library docgen.model_helpers;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import '../exports/dart2js_mirrors.dart' as dart2js_mirrors; 9 import '../exports/dart2js_mirrors.dart' as dart2js_mirrors;
10 import '../exports/mirrors_util.dart' as dart2js_util; 10 import '../exports/mirrors_util.dart' as dart2js_util;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 var docgenAnnotation = new Annotation(annotation, owningLibrary); 85 var docgenAnnotation = new Annotation(annotation, owningLibrary);
86 if (!_SKIPPED_ANNOTATIONS.contains(dart2js_util.qualifiedNameOf( 86 if (!_SKIPPED_ANNOTATIONS.contains(dart2js_util.qualifiedNameOf(
87 docgenAnnotation.mirror))) { 87 docgenAnnotation.mirror))) {
88 annotations.add(docgenAnnotation); 88 annotations.add(docgenAnnotation);
89 } 89 }
90 }); 90 });
91 return annotations; 91 return annotations;
92 } 92 }
93 93
94 /// A declaration is private if itself is private, or the owner is private. 94 /// A declaration is private if itself is private, or the owner is private.
95 // Issue(12202) - A declaration is public even if it's owner is private.
kevmoo 2014/04/22 22:12:58 This was long-ago closed as by-design
96 bool isHidden(DeclarationSourceMirror mirror) { 95 bool isHidden(DeclarationSourceMirror mirror) {
97 if (mirror is LibraryMirror) { 96 if (mirror is LibraryMirror) {
98 return _isLibraryPrivate(mirror); 97 return _isLibraryPrivate(mirror);
99 } else if (mirror.owner is LibraryMirror) { 98 } else if (mirror.owner is LibraryMirror) {
100 return (mirror.isPrivate || _isLibraryPrivate(mirror.owner) || 99 return (mirror.isPrivate || _isLibraryPrivate(mirror.owner) ||
101 mirror.isNameSynthetic); 100 mirror.isNameSynthetic);
102 } else { 101 } else {
103 return (mirror.isPrivate || isHidden(mirror.owner) || 102 return (mirror.isPrivate || isHidden(mirror.owner) ||
104 mirror.isNameSynthetic); 103 mirror.isNameSynthetic);
105 } 104 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // the time. 277 // the time.
279 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)]; 278 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)];
280 if (sdkLibrary != null) { 279 if (sdkLibrary != null) {
281 return !sdkLibrary.documented; 280 return !sdkLibrary.documented;
282 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf( 281 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf(
283 mirror).contains('._')) { 282 mirror).contains('._')) {
284 return true; 283 return true;
285 } 284 }
286 return false; 285 return false;
287 } 286 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/models/indexable.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698