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

Unified Diff: pkg/analyzer/lib/src/task/options.dart

Issue 2522543007: Remove uses of configuration data (Closed)
Patch Set: clean-up Created 4 years, 1 month 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 | « pkg/analyzer/lib/src/services/lint.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/options.dart
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 17aa0c88234b5ae6c1cd3522292f79670ab967de..dafb6d87d80bcee8a1d2f9892e59c4efbea7cfa8 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -10,7 +10,6 @@ import 'package:analyzer/analyzer.dart';
import 'package:analyzer/plugin/options.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
import 'package:analyzer/source/error_processor.dart';
-import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/source.dart';
@@ -29,14 +28,6 @@ final ListResultDescriptor<AnalysisError> ANALYSIS_OPTIONS_ERRORS =
new ListResultDescriptor<AnalysisError>(
'ANALYSIS_OPTIONS_ERRORS', AnalysisError.NO_ERRORS);
-/**
- * The descriptor used to associate error processors with analysis contexts in
- * configuration data.
- */
-final ListResultDescriptor<ErrorProcessor> CONFIGURED_ERROR_PROCESSORS =
- new ListResultDescriptor<ErrorProcessor>(
- 'configured.errors', const <ErrorProcessor>[]);
-
final _OptionsProcessor _processor = new _OptionsProcessor();
void applyToAnalysisOptions(
@@ -547,7 +538,10 @@ class _OptionsProcessor {
if (excludes is YamlList) {
List<String> excludeList = toStringList(excludes);
if (excludeList != null) {
- context.setConfigurationData(CONTEXT_EXCLUDES, excludeList);
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.excludePatterns = excludeList;
+ context.analysisOptions = options;
}
}
}
@@ -595,8 +589,10 @@ class _OptionsProcessor {
void setProcessors(AnalysisContext context, Object codes) {
ErrorConfig config = new ErrorConfig(codes);
- context.setConfigurationData(
- CONFIGURED_ERROR_PROCESSORS, config.processors);
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.errorProcessors = config.processors;
+ context.analysisOptions = options;
}
void setStrongMode(AnalysisContext context, Object strongMode) {
« no previous file with comments | « pkg/analyzer/lib/src/services/lint.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698