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_cli.src.analyzer_impl; | 5 library analyzer_cli.src.analyzer_impl; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 | 10 |
11 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
12 import 'package:analyzer/error/error.dart'; | 12 import 'package:analyzer/error/error.dart'; |
13 import 'package:analyzer/exception/exception.dart'; | 13 import 'package:analyzer/exception/exception.dart'; |
14 import 'package:analyzer/src/dart/analysis/driver.dart'; | 14 import 'package:analyzer/src/dart/analysis/driver.dart'; |
15 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult; | 15 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult; |
16 import 'package:analyzer/src/generated/java_io.dart'; | 16 import 'package:analyzer/src/generated/java_io.dart'; |
17 import 'package:analyzer/src/generated/source.dart'; | 17 import 'package:analyzer/src/generated/source.dart'; |
18 import 'package:analyzer/src/generated/source_io.dart'; | 18 import 'package:analyzer/src/generated/source_io.dart'; |
19 import 'package:analyzer/src/generated/utilities_general.dart'; | 19 import 'package:analyzer/src/generated/utilities_general.dart'; |
20 import 'package:analyzer_cli/src/driver.dart'; | 20 import 'package:analyzer_cli/src/analyzer_driver.dart'; |
| 21 import 'package:analyzer_cli/src/analyzer_options.dart'; |
21 import 'package:analyzer_cli/src/error_formatter.dart'; | 22 import 'package:analyzer_cli/src/error_formatter.dart'; |
22 import 'package:analyzer_cli/src/error_severity.dart'; | 23 import 'package:analyzer_cli/src/error_severity.dart'; |
23 import 'package:analyzer_cli/src/options.dart'; | |
24 import 'package:path/path.dart' as path; | 24 import 'package:path/path.dart' as path; |
25 | 25 |
26 int get currentTimeMillis => new DateTime.now().millisecondsSinceEpoch; | 26 int get currentTimeMillis => new DateTime.now().millisecondsSinceEpoch; |
27 | 27 |
28 /// Analyzes single library [File]. | 28 /// Analyzes single library [File]. |
29 class AnalyzerImpl { | 29 class AnalyzerImpl { |
30 static final PerformanceTag _prepareErrorsTag = | 30 static final PerformanceTag _prepareErrorsTag = |
31 new PerformanceTag("AnalyzerImpl.prepareErrors"); | 31 new PerformanceTag("AnalyzerImpl.prepareErrors"); |
32 static final PerformanceTag _resolveLibraryTag = | 32 static final PerformanceTag _resolveLibraryTag = |
33 new PerformanceTag("AnalyzerImpl._resolveLibrary"); | 33 new PerformanceTag("AnalyzerImpl._resolveLibrary"); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 } | 308 } |
309 | 309 |
310 @override | 310 @override |
311 void logInformation(String message, [CaughtException exception]) { | 311 void logInformation(String message, [CaughtException exception]) { |
312 outSink.writeln(message); | 312 outSink.writeln(message); |
313 if (exception != null) { | 313 if (exception != null) { |
314 outSink.writeln(exception); | 314 outSink.writeln(exception); |
315 } | 315 } |
316 } | 316 } |
317 } | 317 } |
OLD | NEW |