| Index: packages/analyzer/lib/plugin/options.dart
|
| diff --git a/analyzer/lib/plugin/options.dart b/packages/analyzer/lib/plugin/options.dart
|
| similarity index 88%
|
| rename from analyzer/lib/plugin/options.dart
|
| rename to packages/analyzer/lib/plugin/options.dart
|
| index cc0b88d5a1aa9abc4a9d53df1bcccd6b964c7e11..fb99a5070f5717c71d3992c6967c9ed63f9857d5 100644
|
| --- a/analyzer/lib/plugin/options.dart
|
| +++ b/packages/analyzer/lib/plugin/options.dart
|
| @@ -6,6 +6,7 @@
|
| /// analysis options file.
|
| library analyzer.plugin.options;
|
|
|
| +import 'package:analyzer/src/generated/engine.dart';
|
| import 'package:analyzer/src/plugin/options_plugin.dart';
|
| import 'package:plugin/plugin.dart';
|
| import 'package:yaml/yaml.dart';
|
| @@ -18,7 +19,7 @@ final String OPTIONS_PROCESSOR_EXTENSION_POINT_ID = Plugin.join(
|
| OptionsPlugin.OPTIONS_PROCESSOR_EXTENSION_POINT);
|
|
|
| /// Processes options defined in the analysis options file.
|
| -///
|
| +///
|
| /// The options file format is intentionally very open-ended, giving clients
|
| /// utmost flexibility in defining their own options. The only hardfast
|
| /// expectation is that options files will contain a mapping from Strings
|
| @@ -45,17 +46,18 @@ final String OPTIONS_PROCESSOR_EXTENSION_POINT_ID = Plugin.join(
|
| /// bool useMultiPackage =
|
| /// options['compiler']['resolver']['useMultiPackage'];
|
| abstract class OptionsProcessor {
|
| -
|
| /// Called when an error occurs in processing options.
|
| void onError(Exception exception);
|
|
|
| - /// Called when the options file is processed.
|
| + /// Called when an options file is processed.
|
| ///
|
| /// The options file is processed on analyzer initialization and
|
| /// subsequently when the file is changed on disk. In the event of a
|
| /// change notification, note that the notification simply indicates
|
| /// a change on disk. Content in specific option scopes may or may not
|
| /// be different. It is up to the implementer to check whether specific
|
| - /// options have changed and to handle those changes appropriately.
|
| - void optionsProcessed(Map<String, YamlNode> options);
|
| + /// options have changed and to handle those changes appropriately. In
|
| + /// addition to the [options] map, the associated analysis [context] is
|
| + /// provided as well to allow for context-specific configuration.
|
| + void optionsProcessed(AnalysisContext context, Map<String, YamlNode> options);
|
| }
|
|
|