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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1107583004: switch -package-root to use PackageMapUriResolver (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index bd3dc86c35347e51eb34c8a3392e0afc1b7f6920..509fcd12cd51a9515d91c3c82043876ac6ae4c7d 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -389,6 +389,15 @@ abstract class ContextManager {
UriResolver _computePackageUriResolver(Folder folder, _ContextInfo info) {
if (info.packageRoot != null) {
info.packageMapInfo = null;
+ Resource res = resourceProvider.getResource(info.packageRoot);
+ if (res is Folder) {
+ Map<String, List<Folder>> packageMap = new Map<String, List<Folder>>();
+ for (Folder folder in res.getChildren()) {
+ packageMap[folder.shortName] = <Folder>[folder];
+ }
+ return new PackageMapUriResolver(resourceProvider, packageMap);
+ }
+ //TODO(danrubel) remove this if it will never be called
return new PackageUriResolver([new JavaFile(info.packageRoot)]);
} else {
beginComputePackageMap();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698