Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/source.dart |
| =================================================================== |
| --- pkg/analyzer/lib/src/generated/source.dart (revision 43141) |
| +++ pkg/analyzer/lib/src/generated/source.dart (working copy) |
| @@ -10,6 +10,9 @@ |
| import "dart:math" as math; |
| import 'dart:collection'; |
| +import 'package:analyzer/file_system/file_system.dart'; |
| +import 'package:analyzer/source/package_map_resolver.dart'; |
| + |
| import 'engine.dart'; |
| import 'java_core.dart'; |
| import 'java_engine.dart'; |
| @@ -595,6 +598,14 @@ |
| this._localSourcePredicate = localSourcePredicate; |
| } |
| + /// A table mapping package names to the path of the directories containing |
| + /// the package (or [null] if there is no registered package URI resolver). |
| + Map<String, Folder> get packageMap { |
| + PackageMapUriResolver resolver = |
| + _resolvers.firstWhere((r) => r is PackageMapUriResolver, orElse: null); |
| + return resolver != null ? resolver.packageMap : null; |
|
scheglov
2015/01/26 21:40:08
Unless I miss something, type of PackageMapUriReso
pquitslund
2015/01/26 23:36:31
Nope. Spot on. Fixed.
|
| + } |
| + |
| /** |
| * Return a source object representing the given absolute URI, or `null` if the URI is not a |
| * valid URI or if it is not an absolute URI. |