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 import 'dart:collection'; | 5 import 'dart:collection'; |
6 import 'dart:io' as io; | 6 import 'dart:io' as io; |
7 | 7 |
8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
9 import 'package:analyzer/file_system/file_system.dart' | 9 import 'package:analyzer/file_system/file_system.dart' |
10 show File, Folder, ResourceProvider, ResourceUriResolver; | 10 show File, Folder, ResourceProvider, ResourceUriResolver; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 printAndFail( | 204 printAndFail( |
205 'Unable to read package config data from $packageConfigPath: $e'); | 205 'Unable to read package config data from $packageConfigPath: $e'); |
206 } | 206 } |
207 } | 207 } |
208 return null; | 208 return null; |
209 } | 209 } |
210 | 210 |
211 void _processPlugins() { | 211 void _processPlugins() { |
212 List<Plugin> plugins = <Plugin>[]; | 212 List<Plugin> plugins = <Plugin>[]; |
213 plugins.addAll(AnalysisEngine.instance.requiredPlugins); | 213 plugins.addAll(AnalysisEngine.instance.requiredPlugins); |
214 plugins.add(AnalysisEngine.instance.commandLinePlugin); | |
215 ExtensionManager manager = new ExtensionManager(); | 214 ExtensionManager manager = new ExtensionManager(); |
216 manager.processPlugins(plugins); | 215 manager.processPlugins(plugins); |
217 } | 216 } |
218 } | 217 } |
219 | 218 |
220 class DriverOptions { | 219 class DriverOptions { |
221 /// The maximum number of sources for which AST structures should be kept | 220 /// The maximum number of sources for which AST structures should be kept |
222 /// in the cache. The default is 512. | 221 /// in the cache. The default is 512. |
223 int cacheSize = 512; | 222 int cacheSize = 512; |
224 | 223 |
(...skipping 27 matching lines...) Expand all Loading... |
252 } | 251 } |
253 | 252 |
254 /// Prints logging information comments to the [outSink] and error messages to | 253 /// Prints logging information comments to the [outSink] and error messages to |
255 /// [errorSink]. | 254 /// [errorSink]. |
256 class StdLogger extends Logger { | 255 class StdLogger extends Logger { |
257 @override | 256 @override |
258 void logError(String message, [exception]) => errorSink.writeln(message); | 257 void logError(String message, [exception]) => errorSink.writeln(message); |
259 @override | 258 @override |
260 void logInformation(String message, [exception]) => outSink.writeln(message); | 259 void logInformation(String message, [exception]) => outSink.writeln(message); |
261 } | 260 } |
OLD | NEW |