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

Unified Diff: pkg/analysis_server/lib/src/context_manager.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
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 8575086ec3ac51bedf108b5a609fcd006469b618..3224a205bcd018570c34e011984c0ef6f484b410 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -307,12 +307,6 @@ abstract class ContextManager {
*/
abstract class ContextManagerCallbacks {
/**
- * Return the default analysis options to be used when creating an analysis
- * context.
- */
- AnalysisOptions get defaultAnalysisOptions;
-
- /**
* Create and return a new analysis context rooted at the given [folder], with
* the given analysis [options], allowing [disposition] to govern details of
* how the context is to be created.
@@ -460,6 +454,11 @@ class ContextManagerImpl implements ContextManager {
*/
final InstrumentationService _instrumentationService;
+ /**
+ * The default options used to create new analysis contexts.
+ */
+ final AnalysisOptionsImpl defaultContextOptions;
+
@override
ContextManagerCallbacks callbacks;
@@ -481,7 +480,8 @@ class ContextManagerImpl implements ContextManager {
this.packageResolverProvider,
this.embeddedUriResolverProvider,
this._packageMapProvider,
- this._instrumentationService) {
+ this._instrumentationService,
+ this.defaultContextOptions) {
absolutePathContext = resourceProvider.absolutePathContext;
pathContext = resourceProvider.pathContext;
}
@@ -892,7 +892,6 @@ class ContextManagerImpl implements ContextManager {
if (sourceFactory is SourceFactoryImpl) {
if (!sourceFactory.resolvers
.any((UriResolver r) => r is EmbedderUriResolver)) {
-
// Get all but the dart: Uri resolver.
List<UriResolver> resolvers = sourceFactory.resolvers
.where((r) => r is! DartUriResolver)
@@ -1046,7 +1045,7 @@ class ContextManagerImpl implements ContextManager {
Map<String, Object> optionMap = readOptions(info.folder);
AnalysisOptions options =
- new AnalysisOptionsImpl.from(callbacks.defaultAnalysisOptions);
+ new AnalysisOptionsImpl.from(defaultContextOptions);
applyToAnalysisOptions(options, optionMap);
info.setDependencies(dependencies);
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698