OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer.src.plugin.options; | 5 library analyzer.src.plugin.options_plugin; |
6 | 6 |
7 import 'package:analyzer/plugin/options.dart'; | 7 import 'package:analyzer/plugin/options.dart'; |
8 import 'package:analyzer/plugin/task.dart'; | 8 import 'package:analyzer/plugin/task.dart'; |
9 import 'package:analyzer/src/task/options.dart'; | 9 import 'package:analyzer/src/task/options.dart'; |
10 import 'package:plugin/plugin.dart'; | 10 import 'package:plugin/plugin.dart'; |
11 | 11 |
12 /// A plugin that defines the extension points and extensions that are defined | 12 /// A plugin that defines the extension points and extensions that are defined |
13 /// by applications that want to consume options defined in the analysis | 13 /// by applications that want to consume options defined in the analysis |
14 /// options file. | 14 /// options file. |
15 class OptionsPlugin implements Plugin { | 15 class OptionsPlugin implements Plugin { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 /// Validate the given extension by throwing an [ExtensionError] if it is not | 73 /// Validate the given extension by throwing an [ExtensionError] if it is not |
74 /// a valid options validator. | 74 /// a valid options validator. |
75 void _validateOptionsValidatorExtension(Object extension) { | 75 void _validateOptionsValidatorExtension(Object extension) { |
76 if (extension is! OptionsValidator) { | 76 if (extension is! OptionsValidator) { |
77 String id = optionsValidatorExtensionPoint.uniqueIdentifier; | 77 String id = optionsValidatorExtensionPoint.uniqueIdentifier; |
78 throw new ExtensionError('Extensions to $id must be an OptionsValidator'); | 78 throw new ExtensionError('Extensions to $id must be an OptionsValidator'); |
79 } | 79 } |
80 } | 80 } |
81 } | 81 } |
OLD | NEW |