| 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:analyzer/src/generated/engine.dart'; | 8 import 'package:analyzer/src/generated/engine.dart'; |
| 9 import 'package:yaml/yaml.dart'; | 9 import 'package:yaml/yaml.dart'; |
| 10 | 10 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 PluginConfig get config => _config; | 136 PluginConfig get config => _config; |
| 137 | 137 |
| 138 @override | 138 @override |
| 139 void onError(Exception exception) { | 139 void onError(Exception exception) { |
| 140 if (_errorHandler != null) { | 140 if (_errorHandler != null) { |
| 141 _errorHandler(exception); | 141 _errorHandler(exception); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 @override | 145 @override |
| 146 void optionsProcessed( | 146 void optionsProcessed(AnalysisContext context, Map<String, Object> options) { |
| 147 AnalysisContext context, Map<String, Object> options) { | |
| 148 _config = new PluginConfig.fromOptions(options); | 147 _config = new PluginConfig.fromOptions(options); |
| 149 } | 148 } |
| 150 } | 149 } |
| 151 | 150 |
| 152 /// Describes plugin information. | 151 /// Describes plugin information. |
| 153 class PluginInfo { | 152 class PluginInfo { |
| 154 final String name; | 153 final String name; |
| 155 final String className; | 154 final String className; |
| 156 final String version; | 155 final String version; |
| 157 final String libraryUri; | 156 final String libraryUri; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 /// Provisional manifest file format: | 189 /// Provisional manifest file format: |
| 191 /// | 190 /// |
| 192 /// class_name: MyAnalyzerPlugin | 191 /// class_name: MyAnalyzerPlugin |
| 193 /// library_uri: 'my_plugin/my_analyzer_plugin.dart' | 192 /// library_uri: 'my_plugin/my_analyzer_plugin.dart' |
| 194 /// contributes_to: analyzer | 193 /// contributes_to: analyzer |
| 195 class PluginManifest { | 194 class PluginManifest { |
| 196 PluginInfo plugin; | 195 PluginInfo plugin; |
| 197 Iterable<String> contributesTo; | 196 Iterable<String> contributesTo; |
| 198 PluginManifest({this.plugin, this.contributesTo}); | 197 PluginManifest({this.plugin, this.contributesTo}); |
| 199 } | 198 } |
| OLD | NEW |