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

Unified Diff: pkg/analyzer/lib/src/plugin/plugin_configuration.dart

Issue 1506963002: Options processing API update (#25126). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/plugin/options.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/plugin/plugin_configuration.dart
diff --git a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
index 9365a3c3eefe8a75fa4c31c718874ec12896077f..222e376e35c91a69dd067d974af7b6266cf75c7c 100644
--- a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
+++ b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
@@ -84,10 +84,11 @@ class PluginConfig {
PluginConfig(this.plugins);
/// Create a plugin configuration from an options map.
- factory PluginConfig.fromOptions(Map<String, YamlNode> options) {
+ factory PluginConfig.fromOptions(Map<String, Object> options) {
List<PluginInfo> plugins = [];
var analyzerOptions = options[_analyzerOptionScope];
if (analyzerOptions != null) {
+ //TODO(pq): handle "raw" maps (https://github.com/dart-lang/sdk/issues/25126)
if (analyzerOptions is YamlMap) {
var pluginConfig = analyzerOptions[_pluginOptionScope];
if (pluginConfig is YamlMap) {
@@ -143,7 +144,7 @@ class PluginConfigOptionsProcessor extends OptionsProcessor {
@override
void optionsProcessed(
- AnalysisContext context, Map<String, YamlNode> options) {
+ AnalysisContext context, Map<String, Object> options) {
_config = new PluginConfig.fromOptions(options);
}
}
« no previous file with comments | « pkg/analyzer/lib/plugin/options.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698