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.plugin_configuration; | 5 library analyzer.src.plugin.plugin_configuration; |
6 | 6 |
7 import 'package:analyzer/plugin/options.dart'; | 7 import 'package:analyzer/plugin/options.dart'; |
8 import 'package:yaml/yaml.dart'; | 8 import 'package:yaml/yaml.dart'; |
9 | 9 |
10 const _analyzerOptionScope = 'analyzer'; | 10 const _analyzerOptionScope = 'analyzer'; |
(...skipping 12 matching lines...) Expand all Loading... |
23 className: details['class_name'], | 23 className: details['class_name'], |
24 libraryUri: details['library_uri'], | 24 libraryUri: details['library_uri'], |
25 packageName: details['package_name'], | 25 packageName: details['package_name'], |
26 path: details['path']); | 26 path: details['path']); |
27 } | 27 } |
28 } | 28 } |
29 | 29 |
30 return null; | 30 return null; |
31 } | 31 } |
32 | 32 |
33 typedef ErrorHandler(Exception); | 33 /// A callback for error handling. |
| 34 typedef ErrorHandler(Exception e); |
34 | 35 |
35 /// Describes plugin configuration information as extracted from an | 36 /// Describes plugin configuration information as extracted from an |
36 /// analysis options map. | 37 /// analysis options map. |
37 class PluginConfig { | 38 class PluginConfig { |
38 final Iterable<PluginInfo> plugins; | 39 final Iterable<PluginInfo> plugins; |
39 PluginConfig(this.plugins); | 40 PluginConfig(this.plugins); |
40 | 41 |
41 /// Create a plugin configuration from an options map. | 42 /// Create a plugin configuration from an options map. |
42 factory PluginConfig.fromOptions(Map<String, YamlNode> options) { | 43 factory PluginConfig.fromOptions(Map<String, YamlNode> options) { |
43 List<PluginInfo> plugins = []; | 44 List<PluginInfo> plugins = []; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 final String packageName; | 111 final String packageName; |
111 final String path; | 112 final String path; |
112 PluginInfo( | 113 PluginInfo( |
113 {this.name, | 114 {this.name, |
114 this.version, | 115 this.version, |
115 this.className, | 116 this.className, |
116 this.libraryUri, | 117 this.libraryUri, |
117 this.packageName, | 118 this.packageName, |
118 this.path}); | 119 this.path}); |
119 } | 120 } |
OLD | NEW |