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

Side by Side Diff: pkg/docgen/lib/src/models/model_helpers.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 unified diff | Download patch | Annotate | Revision Log
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;
11 import '../exports/source_mirrors.dart'; 11 import '../exports/source_mirrors.dart';
12 import '../exports/libraries.dart'; 12 import '../exports/libraries.dart';
13 13
14 import '../library_helpers.dart' show includePrivateMembers; 14 import '../library_helpers.dart' show includePrivateMembers;
15 import '../package_helpers.dart'; 15 import '../package_helpers.dart';
16 16
17 import 'annotation.dart'; 17 import 'annotation.dart';
18 import 'generic.dart'; 18 import 'generic.dart';
19 import 'indexable.dart'; 19 import 'indexable.dart';
20 import 'library.dart'; 20 import 'library.dart';
21 import 'method.dart'; 21 import 'method.dart';
22 import 'parameter.dart'; 22 import 'parameter.dart';
23 import 'variable.dart'; 23 import 'variable.dart';
24 24
25 String getLibraryDocName(LibraryMirror mirror) =>
26 dart2js_util.qualifiedNameOf(mirror).replaceAll('.', '-');
27
25 /// Expand the method map [mapToExpand] into a more detailed map that 28 /// Expand the method map [mapToExpand] into a more detailed map that
26 /// separates out setters, getters, constructors, operators, and methods. 29 /// separates out setters, getters, constructors, operators, and methods.
27 Map expandMethodMap(Map<String, Method> mapToExpand) => { 30 Map expandMethodMap(Map<String, Method> mapToExpand) => {
28 'setters': recurseMap(filterMap(mapToExpand, 31 'setters': recurseMap(filterMap(mapToExpand,
29 (key, val) => val.mirror.isSetter)), 32 (key, val) => val.mirror.isSetter)),
30 'getters': recurseMap(filterMap(mapToExpand, 33 'getters': recurseMap(filterMap(mapToExpand,
31 (key, val) => val.mirror.isGetter)), 34 (key, val) => val.mirror.isGetter)),
32 'constructors': recurseMap(filterMap(mapToExpand, 35 'constructors': recurseMap(filterMap(mapToExpand,
33 (key, val) => val.mirror.isConstructor)), 36 (key, val) => val.mirror.isConstructor)),
34 'operators': recurseMap(filterMap(mapToExpand, 37 'operators': recurseMap(filterMap(mapToExpand,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // the time. 278 // the time.
276 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)]; 279 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)];
277 if (sdkLibrary != null) { 280 if (sdkLibrary != null) {
278 return !sdkLibrary.documented; 281 return !sdkLibrary.documented;
279 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf( 282 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf(
280 mirror).contains('._')) { 283 mirror).contains('._')) {
281 return true; 284 return true;
282 } 285 }
283 return false; 286 return false;
284 } 287 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/models/method.dart ('k') | pkg/docgen/test/multi_library_code/lib/root_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698