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

Unified Diff: pkg/analysis_server/lib/src/context_manager.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 | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | 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 86b13a101c120425708e6795a0a7d54a5e83ce34..fd35213fc99a8963a0232387f8e2dd7d3d4b8de6 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -1710,6 +1710,10 @@ class CustomPackageResolverDisposition extends FolderDisposition {
@override
EmbedderYamlLocator getEmbedderLocator(ResourceProvider resourceProvider) =>
new EmbedderYamlLocator(null);
+
+ @override
+ SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) =>
+ new SdkExtensionFinder(null);
}
/**
@@ -1757,6 +1761,13 @@ abstract class FolderDisposition {
* where that is necessary.
*/
EmbedderYamlLocator getEmbedderLocator(ResourceProvider resourceProvider);
+
+ /**
+ * Return the extension finder used to locate the `_sdkext` file used to add
+ * extensions to the SDK. The [resourceProvider] is used to access the file
+ * system in cases where that is necessary.
+ */
+ SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider);
}
/**
@@ -1780,6 +1791,10 @@ class NoPackageFolderDisposition extends FolderDisposition {
@override
EmbedderYamlLocator getEmbedderLocator(ResourceProvider resourceProvider) =>
new EmbedderYamlLocator(null);
+
+ @override
+ SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) =>
+ new SdkExtensionFinder(null);
}
/**
@@ -1790,6 +1805,7 @@ class PackageMapDisposition extends FolderDisposition {
final Map<String, List<Folder>> packageMap;
EmbedderYamlLocator _embedderLocator;
+ SdkExtensionFinder _sdkExtensionFinder;
@override
final String packageRoot;
@@ -1814,6 +1830,11 @@ class PackageMapDisposition extends FolderDisposition {
}
return _embedderLocator;
}
+
+ @override
+ SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) {
+ return _sdkExtensionFinder ??= new SdkExtensionFinder(packageMap);
+ }
}
/**
@@ -1827,6 +1848,7 @@ class PackagesFileDisposition extends FolderDisposition {
Map<String, List<Folder>> packageMap;
EmbedderYamlLocator _embedderLocator;
+ SdkExtensionFinder _sdkExtensionFinder;
PackagesFileDisposition(this.packages);
@@ -1868,4 +1890,10 @@ class PackagesFileDisposition extends FolderDisposition {
}
return _embedderLocator;
}
+
+ @override
+ SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) {
+ return _sdkExtensionFinder ??=
+ new SdkExtensionFinder(buildPackageMap(resourceProvider));
+ }
}
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698