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

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

Issue 1739913003: Start work to remove the context manager callbacks (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/analysis_server/lib/src/context_manager.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 df9075e0dd9c274c8d7e7a5394cb3bbc3b382944..fe03e64a0228bbd7761390c7d0b98ac4051bd9ba 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -280,9 +280,10 @@ class AnalysisServer {
Set<String> prevAnalyzedFiles;
/**
- * The default options used to create new analysis contexts.
+ * The default options used to create new analysis contexts. This object is
+ * also referenced by the ContextManager.
*/
- AnalysisOptionsImpl defaultContextOptions = new AnalysisOptionsImpl();
+ final AnalysisOptionsImpl defaultContextOptions = new AnalysisOptionsImpl();
/**
* The controller for sending [ContextsChangedEvent]s.
@@ -314,22 +315,23 @@ class AnalysisServer {
: index = _index,
searchEngine = _index != null ? createSearchEngine(_index) : null {
_performance = performanceDuringStartup;
+ defaultContextOptions.incremental = true;
+ defaultContextOptions.incrementalApi =
+ options.enableIncrementalResolutionApi;
+ defaultContextOptions.incrementalValidation =
+ options.enableIncrementalResolutionValidation;
+ defaultContextOptions.generateImplicitErrors = false;
operationQueue = new ServerOperationQueue();
contextManager = new ContextManagerImpl(
resourceProvider,
packageResolverProvider,
embeddedResolverProvider,
packageMapProvider,
- instrumentationService);
+ instrumentationService,
+ defaultContextOptions);
ServerContextManagerCallbacks contextManagerCallbacks =
new ServerContextManagerCallbacks(this, resourceProvider);
contextManager.callbacks = contextManagerCallbacks;
- defaultContextOptions.incremental = true;
- defaultContextOptions.incrementalApi =
- options.enableIncrementalResolutionApi;
- defaultContextOptions.incrementalValidation =
- options.enableIncrementalResolutionValidation;
- defaultContextOptions.generateImplicitErrors = false;
_noErrorNotification = options.noErrorNotification;
AnalysisEngine.instance.logger = new AnalysisLogger(this);
_onAnalysisStartedController = new StreamController.broadcast();
@@ -1481,10 +1483,6 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
}
@override
- AnalysisOptions get defaultAnalysisOptions =>
- analysisServer.defaultContextOptions;
-
- @override
AnalysisContext addContext(
Folder folder, AnalysisOptions options, FolderDisposition disposition) {
InternalAnalysisContext context =
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698