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

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

Issue 2647293007: Move driver creation into ContextBuilder (Closed)
Patch Set: Created 3 years, 11 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/analyzer/lib/src/context/builder.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 3a9d6b31a619f51a381715af3f51aa0b8acf4d58..dcce078119c16fd3f9e71e212a970babc4e6cef8 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -1818,24 +1818,8 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
@override
nd.AnalysisDriver addAnalysisDriver(Folder folder, AnalysisOptions options) {
- SourceFactory sourceFactory;
- AnalysisOptions analysisOptions;
- {
- ContextBuilder builder = createContextBuilder(folder, options);
- AnalysisContext context = builder.buildContext(folder.path);
- sourceFactory = context.sourceFactory;
- analysisOptions = context.analysisOptions;
- context.dispose();
- }
- nd.AnalysisDriver analysisDriver = new nd.AnalysisDriver(
- analysisServer.analysisDriverScheduler,
- analysisServer._analysisPerformanceLogger,
- resourceProvider,
- analysisServer.byteStore,
- analysisServer.fileContentOverlay,
- folder.path,
- sourceFactory,
- analysisOptions);
+ ContextBuilder builder = createContextBuilder(folder, options);
+ nd.AnalysisDriver analysisDriver = builder.buildDriver(folder.path);
analysisDriver.status.listen((status) {
// TODO(scheglov) send server status
});
@@ -1973,6 +1957,10 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
options: builderOptions);
builder.fileResolverProvider = analysisServer.fileResolverProvider;
builder.packageResolverProvider = analysisServer.packageResolverProvider;
+ builder.analysisDriverScheduler = analysisServer.analysisDriverScheduler;
+ builder.performanceLog = analysisServer._analysisPerformanceLogger;
+ builder.byteStore = analysisServer.byteStore;
+ builder.fileContentOverlay = analysisServer.fileContentOverlay;
return builder;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698