Index: pkg/analysis_server/lib/src/analysis_server.dart |
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart |
index c647aedd6c0e599fba5696a6d68208b63e50d374..866f58ae452f315626a5858e6bdc2ceb3b1d88ff 100644 |
--- a/pkg/analysis_server/lib/src/analysis_server.dart |
+++ b/pkg/analysis_server/lib/src/analysis_server.dart |
@@ -1683,6 +1683,9 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks { |
disposition.createPackageUriResolvers(resourceProvider); |
// If no embedded URI resolver was provided, defer to a locator-backed one. |
+ SdkExtensionFinder extFinder = |
+ disposition.getSdkExtensionFinder(resourceProvider); |
+ List<String> extFilePaths = extFinder.extensionFilePaths; |
EmbedderYamlLocator locator = |
disposition.getEmbedderLocator(resourceProvider); |
Map<Folder, YamlMap> embedderYamls = locator.embedderYamls; |
@@ -1700,8 +1703,12 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks { |
.getChildAssumingFile(EmbedderYamlLocator.EMBEDDER_FILE_NAME) |
.path); |
} |
+ paths.addAll(extFilePaths); |
DartSdk dartSdk = analysisServer.sdkManager |
.getSdk(new SdkDescription(paths, options), () { |
+ if (extFilePaths.isNotEmpty) { |
+ embedderSdk.addExtensions(extFinder.urlMappings); |
+ } |
embedderSdk.analysisOptions = options; |
// TODO(brianwilkerson) Enable summary use after we have decided where |
// summary files for embedder files will live. |