| 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 8bbadccbfe05d26f957784f79d4fb3257ccb1f6e..4a281b7cd25b35d8916bf8c963e9434464862318 100644
|
| --- a/pkg/analysis_server/lib/src/context_manager.dart
|
| +++ b/pkg/analysis_server/lib/src/context_manager.dart
|
| @@ -988,14 +988,14 @@ class ContextManagerImpl implements ContextManager {
|
| String path, ContextInfo info, ChangeType changeType) {
|
| if (AnalysisEngine.isAnalysisOptionsFileName(path, pathContext)) {
|
| if (enableNewAnalysisDriver) {
|
| - // TODO(brianwilkerson) Implement this.
|
| -// AnalysisDriver driver = info.analysisDriver;
|
| -// String contextRoot = info.folder.path;
|
| -// ContextBuilder builder =
|
| -// callbacks.createContextBuilder(info.folder, defaultContextOptions);
|
| -// AnalysisOptions options = builder.getAnalysisOptions(contextRoot);
|
| -// driver.analysisOptions = options;
|
| -// driver.sourceFactory = builder.createSourceFactory(contextRoot, options);
|
| + AnalysisDriver driver = info.analysisDriver;
|
| + String contextRoot = info.folder.path;
|
| + ContextBuilder builder =
|
| + callbacks.createContextBuilder(info.folder, defaultContextOptions);
|
| + AnalysisOptions options = builder.getAnalysisOptions(contextRoot);
|
| + SourceFactory factory =
|
| + builder.createSourceFactory(contextRoot, options);
|
| + driver.configure(analysisOptions: options, sourceFactory: factory);
|
| // TODO(brianwilkerson) Set exclusion patterns.
|
| } else {
|
| var analysisContext = info.context;
|
| @@ -1022,8 +1022,13 @@ class ContextManagerImpl implements ContextManager {
|
| callbacks.createContextBuilder(info.folder, defaultContextOptions);
|
| AnalysisOptions options = builder.getAnalysisOptions(contextRoot);
|
| SourceFactory factory = builder.createSourceFactory(contextRoot, options);
|
| - info.context.analysisOptions = options;
|
| - info.context.sourceFactory = factory;
|
| + if (enableNewAnalysisDriver) {
|
| + AnalysisDriver driver = info.analysisDriver;
|
| + driver.configure(analysisOptions: options, sourceFactory: factory);
|
| + } else {
|
| + info.context.analysisOptions = options;
|
| + info.context.sourceFactory = factory;
|
| + }
|
| }
|
| }
|
|
|
|
|