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

Unified Diff: pkg/analyzer/lib/src/generated/sdk_io.dart

Issue 2133873003: Handle SDK extensions in the SDK (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/analyzer/lib/src/context/builder.dart ('k') | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/sdk_io.dart
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index be7c27a6a4b97958fa45eb4a07d8b1c7d053258d..50cb9d066fb7cf512c51c2c6c888ef6499a923f4 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -108,6 +108,20 @@ abstract class AbstractDartSdk implements DartSdk {
_useSummary = use;
}
+ /**
+ * Add the extensions from one or more sdk extension files to this sdk. The
+ * [extensions] should be a table mapping the names of extensions to the paths
+ * where those extensions can be found.
+ */
+ void addExtensions(Map<String, String> extensions) {
+ extensions.forEach((String uri, String path) {
+ String shortName = uri.substring(uri.indexOf(':') + 1);
+ SdkLibraryImpl library = new SdkLibraryImpl(shortName);
+ library.path = path;
+ libraryMap.setLibrary(uri, library);
+ });
+ }
+
@override
Source fromFileUri(Uri uri) {
JavaFile file = new JavaFile.fromUri(uri);
« no previous file with comments | « pkg/analyzer/lib/src/context/builder.dart ('k') | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698