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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 874373003: Library dependencies server API updates (to pass package maps). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698