| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:analyzer/src/generated/utilities_dart.dart'; | 5 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 6 import 'package:analyzer/src/summary/format.dart'; | 6 import 'package:analyzer/src/summary/format.dart'; |
| 7 import 'package:analyzer/src/summary/idl.dart'; | 7 import 'package:analyzer/src/summary/idl.dart'; |
| 8 import 'package:analyzer/src/summary/name_filter.dart'; | 8 import 'package:analyzer/src/summary/name_filter.dart'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 if (kind != null && executable.name.isNotEmpty) { | 278 if (kind != null && executable.name.isNotEmpty) { |
| 279 namespace[executable.name] = new _Meaning( | 279 namespace[executable.name] = new _Meaning( |
| 280 unitNum, kind, 0, executable.typeParameters.length); | 280 unitNum, kind, 0, executable.typeParameters.length); |
| 281 } | 281 } |
| 282 }); | 282 }); |
| 283 return new _ClassMeaning( | 283 return new _ClassMeaning( |
| 284 unitNum, 0, cls.typeParameters.length, namespace); | 284 unitNum, 0, cls.typeParameters.length, namespace); |
| 285 }); | 285 }); |
| 286 } | 286 } |
| 287 for (UnlinkedEnum enm in unit.enums) { | 287 for (UnlinkedEnum enm in unit.enums) { |
| 288 privateNamespace.putIfAbsent(enm.name, | 288 privateNamespace.putIfAbsent(enm.name, () { |
| 289 () => new _Meaning(unitNum, ReferenceKind.classOrEnum, 0, 0)); | 289 Map<String, _Meaning> namespace = <String, _Meaning>{}; |
| 290 enm.values.forEach((UnlinkedEnumValue value) { |
| 291 namespace[value.name] = |
| 292 new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0); |
| 293 }); |
| 294 namespace['values'] = |
| 295 new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0); |
| 296 return new _ClassMeaning(unitNum, 0, 0, namespace); |
| 297 }); |
| 290 } | 298 } |
| 291 for (UnlinkedExecutable executable in unit.executables) { | 299 for (UnlinkedExecutable executable in unit.executables) { |
| 292 privateNamespace.putIfAbsent( | 300 privateNamespace.putIfAbsent( |
| 293 executable.name, | 301 executable.name, |
| 294 () => new _Meaning( | 302 () => new _Meaning( |
| 295 unitNum, | 303 unitNum, |
| 296 executable.kind == UnlinkedExecutableKind.functionOrMethod | 304 executable.kind == UnlinkedExecutableKind.functionOrMethod |
| 297 ? ReferenceKind.topLevelFunction | 305 ? ReferenceKind.topLevelFunction |
| 298 : ReferenceKind.topLevelPropertyAccessor, | 306 : ReferenceKind.topLevelPropertyAccessor, |
| 299 0, | 307 0, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 */ | 514 */ |
| 507 String resolveUri(String sourceUri, String relativeUri) { | 515 String resolveUri(String sourceUri, String relativeUri) { |
| 508 if (sourceUri == null) { | 516 if (sourceUri == null) { |
| 509 return relativeUri; | 517 return relativeUri; |
| 510 } else { | 518 } else { |
| 511 return resolveRelativeUri(Uri.parse(sourceUri), Uri.parse(relativeUri)) | 519 return resolveRelativeUri(Uri.parse(sourceUri), Uri.parse(relativeUri)) |
| 512 .toString(); | 520 .toString(); |
| 513 } | 521 } |
| 514 } | 522 } |
| 515 } | 523 } |
| OLD | NEW |