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 d53d90b26d71a386e0b1b64ecb9b2f197f06e177..b865b8e09c8b891a384a5e70ee9a63c8e1a6c694 100644 |
--- a/pkg/analysis_server/lib/src/analysis_server.dart |
+++ b/pkg/analysis_server/lib/src/analysis_server.dart |
@@ -1603,21 +1603,6 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks { |
ContextBuilder builder = createContextBuilder(folder, options); |
AnalysisContext context = builder.buildContext(folder.path); |
- // TODO(brianwilkerson) Move bundle discovery into ContextBuilder |
- if (analysisServer.options.enablePubSummaryManager) { |
- List<LinkedPubPackage> linkedBundles = |
- analysisServer.pubSummaryManager.getLinkedBundles(context); |
- if (linkedBundles.isNotEmpty) { |
- SummaryDataStore store = new SummaryDataStore([]); |
- for (LinkedPubPackage package in linkedBundles) { |
- store.addBundle(null, package.unlinked); |
- store.addBundle(null, package.linked); |
- } |
- (context as InternalAnalysisContext).resultProvider = |
- new InputPackagesResultProvider(context, store); |
- } |
- } |
- |
analysisServer.folderMap[folder] = context; |
analysisServer._onContextsChangedController |
.add(new ContextsChangedEvent(added: [context])); |
@@ -1668,6 +1653,9 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks { |
builder.packageResolverProvider = analysisServer.packageResolverProvider; |
builder.defaultPackageFilePath = defaultPackageFilePath; |
builder.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath; |
+ if (analysisServer.options.enablePubSummaryManager) { |
+ builder.pubSummaryManager = analysisServer.pubSummaryManager; |
+ } |
return builder; |
} |