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(); |