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

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

Issue 2272093003: Use SdkExtensionFinder in the old Analysis Server implementation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698