| OLD | NEW |
| 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'; |
| 8 |
| 7 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mi
rrors.dart' | 9 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mi
rrors.dart' |
| 8 as dart2js_mirrors; | 10 as dart2js_mirrors; |
| 9 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_ut
il.dart' | 11 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_ut
il.dart' |
| 10 as dart2js_util; | 12 as dart2js_util; |
| 11 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/source_mir
rors.dart'; | 13 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/source_mir
rors.dart'; |
| 12 import '../../../../sdk/lib/_internal/libraries.dart'; | 14 import '../../../../sdk/lib/_internal/libraries.dart'; |
| 13 | 15 |
| 14 import 'library_helpers.dart' show includePrivateMembers; | 16 import 'library_helpers.dart' show includePrivateMembers; |
| 15 import 'models.dart'; | 17 import 'models.dart'; |
| 16 import 'package_helpers.dart'; | 18 import 'package_helpers.dart'; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 40 return (mirror.isPrivate || _isLibraryPrivate(mirror.owner) || | 42 return (mirror.isPrivate || _isLibraryPrivate(mirror.owner) || |
| 41 mirror.isNameSynthetic); | 43 mirror.isNameSynthetic); |
| 42 } else { | 44 } else { |
| 43 return (mirror.isPrivate || isHidden(mirror.owner) || | 45 return (mirror.isPrivate || isHidden(mirror.owner) || |
| 44 mirror.isNameSynthetic); | 46 mirror.isNameSynthetic); |
| 45 } | 47 } |
| 46 } | 48 } |
| 47 | 49 |
| 48 /// Transforms the map by calling toMap on each value in it. | 50 /// Transforms the map by calling toMap on each value in it. |
| 49 Map recurseMap(Map inputMap) { | 51 Map recurseMap(Map inputMap) { |
| 50 var outputMap = {}; | 52 var outputMap = new SplayTreeMap(); |
| 51 inputMap.forEach((key, value) { | 53 inputMap.forEach((key, value) { |
| 52 if (value is Map) { | 54 if (value is Map) { |
| 53 outputMap[key] = recurseMap(value); | 55 outputMap[key] = recurseMap(value); |
| 54 } else { | 56 } else { |
| 55 outputMap[key] = value.toMap(); | 57 outputMap[key] = value.toMap(); |
| 56 } | 58 } |
| 57 }); | 59 }); |
| 58 return outputMap; | 60 return outputMap; |
| 59 } | 61 } |
| 60 | 62 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // the time. | 220 // the time. |
| 219 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)]; | 221 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)]; |
| 220 if (sdkLibrary != null) { | 222 if (sdkLibrary != null) { |
| 221 return !sdkLibrary.documented; | 223 return !sdkLibrary.documented; |
| 222 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf( | 224 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf( |
| 223 mirror).contains('._')) { | 225 mirror).contains('._')) { |
| 224 return true; | 226 return true; |
| 225 } | 227 } |
| 226 return false; | 228 return false; |
| 227 } | 229 } |
| OLD | NEW |