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.build_mode; | 5 library analyzer_cli.src.build_mode; |
6 | 6 |
7 import 'dart:core'; | |
8 import 'dart:io' as io; | 7 import 'dart:io' as io; |
9 | 8 |
10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; | 9 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; |
11 import 'package:analyzer/error/error.dart'; | 10 import 'package:analyzer/error/error.dart'; |
12 import 'package:analyzer/file_system/file_system.dart'; | 11 import 'package:analyzer/file_system/file_system.dart'; |
13 import 'package:analyzer/src/dart/sdk/sdk.dart'; | 12 import 'package:analyzer/src/dart/sdk/sdk.dart'; |
14 import 'package:analyzer/src/generated/engine.dart'; | 13 import 'package:analyzer/src/generated/engine.dart'; |
15 import 'package:analyzer/src/generated/sdk.dart'; | 14 import 'package:analyzer/src/generated/sdk.dart'; |
16 import 'package:analyzer/src/generated/source.dart'; | 15 import 'package:analyzer/src/generated/source.dart'; |
17 import 'package:analyzer/src/generated/source_io.dart'; | 16 import 'package:analyzer/src/generated/source_io.dart'; |
18 import 'package:analyzer/src/source/source_resource.dart'; | 17 import 'package:analyzer/src/source/source_resource.dart'; |
19 import 'package:analyzer/src/summary/format.dart'; | 18 import 'package:analyzer/src/summary/format.dart'; |
20 import 'package:analyzer/src/summary/idl.dart'; | 19 import 'package:analyzer/src/summary/idl.dart'; |
21 import 'package:analyzer/src/summary/link.dart'; | 20 import 'package:analyzer/src/summary/link.dart'; |
22 import 'package:analyzer/src/summary/package_bundle_reader.dart'; | 21 import 'package:analyzer/src/summary/package_bundle_reader.dart'; |
23 import 'package:analyzer/src/summary/summarize_ast.dart'; | 22 import 'package:analyzer/src/summary/summarize_ast.dart'; |
24 import 'package:analyzer/src/summary/summarize_elements.dart'; | 23 import 'package:analyzer/src/summary/summarize_elements.dart'; |
25 import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk; | 24 import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk; |
26 import 'package:analyzer/task/dart.dart'; | 25 import 'package:analyzer/task/dart.dart'; |
27 import 'package:analyzer_cli/src/driver.dart'; | 26 import 'package:analyzer_cli/src/analyzer_driver.dart'; |
28 import 'package:analyzer_cli/src/error_formatter.dart'; | 27 import 'package:analyzer_cli/src/error_formatter.dart'; |
29 import 'package:analyzer_cli/src/error_severity.dart'; | 28 import 'package:analyzer_cli/src/error_severity.dart'; |
30 import 'package:analyzer_cli/src/options.dart'; | 29 import 'package:analyzer_cli/src/analyzer_options.dart'; |
31 import 'package:bazel_worker/bazel_worker.dart'; | 30 import 'package:bazel_worker/bazel_worker.dart'; |
32 | 31 |
33 /** | 32 /** |
34 * Persistent Bazel worker. | 33 * Persistent Bazel worker. |
35 */ | 34 */ |
36 class AnalyzerWorkerLoop extends SyncWorkerLoop { | 35 class AnalyzerWorkerLoop extends SyncWorkerLoop { |
37 final StringBuffer errorBuffer = new StringBuffer(); | 36 final StringBuffer errorBuffer = new StringBuffer(); |
38 final StringBuffer outBuffer = new StringBuffer(); | 37 final StringBuffer outBuffer = new StringBuffer(); |
39 | 38 |
40 final ResourceProvider resourceProvider; | 39 final ResourceProvider resourceProvider; |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 * Build the inverse mapping of [uriToSourceMap]. | 438 * Build the inverse mapping of [uriToSourceMap]. |
440 */ | 439 */ |
441 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) { | 440 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) { |
442 Map<String, Uri> pathToUriMap = <String, Uri>{}; | 441 Map<String, Uri> pathToUriMap = <String, Uri>{}; |
443 uriToSourceMap.forEach((Uri uri, File file) { | 442 uriToSourceMap.forEach((Uri uri, File file) { |
444 pathToUriMap[file.path] = uri; | 443 pathToUriMap[file.path] = uri; |
445 }); | 444 }); |
446 return pathToUriMap; | 445 return pathToUriMap; |
447 } | 446 } |
448 } | 447 } |
OLD | NEW |