OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.context.context_builder; | 5 library analyzer.src.context.context_builder; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:core'; | 8 import 'dart:core'; |
9 | 9 |
10 import 'package:analyzer/context/context_root.dart'; | 10 import 'package:analyzer/context/context_root.dart'; |
11 import 'package:analyzer/context/declared_variables.dart'; | 11 import 'package:analyzer/context/declared_variables.dart'; |
12 import 'package:analyzer/file_system/file_system.dart'; | 12 import 'package:analyzer/file_system/file_system.dart'; |
13 import 'package:analyzer/plugin/resolver_provider.dart'; | 13 import 'package:analyzer/plugin/resolver_provider.dart'; |
14 import 'package:analyzer/source/analysis_options_provider.dart'; | 14 import 'package:analyzer/source/analysis_options_provider.dart'; |
15 import 'package:analyzer/source/package_map_resolver.dart'; | 15 import 'package:analyzer/source/package_map_resolver.dart'; |
16 import 'package:analyzer/src/command_line/arguments.dart' | 16 import 'package:analyzer/src/command_line/arguments.dart' |
17 show | 17 show |
18 applyAnalysisOptionFlags, | 18 applyAnalysisOptionFlags, |
19 bazelAnalysisOptionsPath, | 19 bazelAnalysisOptionsPath, |
20 flutterAnalysisOptionsPath; | 20 flutterAnalysisOptionsPath; |
21 import 'package:analyzer/src/dart/analysis/byte_store.dart'; | |
22 import 'package:analyzer/src/dart/analysis/driver.dart' | 21 import 'package:analyzer/src/dart/analysis/driver.dart' |
23 show AnalysisDriver, AnalysisDriverScheduler, PerformanceLog; | 22 show AnalysisDriver, AnalysisDriverScheduler, PerformanceLog; |
24 import 'package:analyzer/src/dart/analysis/file_state.dart'; | 23 import 'package:analyzer/src/dart/analysis/file_state.dart'; |
25 import 'package:analyzer/src/dart/sdk/sdk.dart'; | 24 import 'package:analyzer/src/dart/sdk/sdk.dart'; |
26 import 'package:analyzer/src/generated/bazel.dart'; | 25 import 'package:analyzer/src/generated/bazel.dart'; |
27 import 'package:analyzer/src/generated/engine.dart'; | 26 import 'package:analyzer/src/generated/engine.dart'; |
28 import 'package:analyzer/src/generated/gn.dart'; | 27 import 'package:analyzer/src/generated/gn.dart'; |
29 import 'package:analyzer/src/generated/sdk.dart'; | 28 import 'package:analyzer/src/generated/sdk.dart'; |
30 import 'package:analyzer/src/generated/source.dart'; | 29 import 'package:analyzer/src/generated/source.dart'; |
31 import 'package:analyzer/src/generated/workspace.dart'; | 30 import 'package:analyzer/src/generated/workspace.dart'; |
32 import 'package:analyzer/src/lint/registry.dart'; | 31 import 'package:analyzer/src/lint/registry.dart'; |
33 import 'package:analyzer/src/summary/summary_sdk.dart'; | 32 import 'package:analyzer/src/summary/summary_sdk.dart'; |
34 import 'package:analyzer/src/task/options.dart'; | 33 import 'package:analyzer/src/task/options.dart'; |
35 import 'package:args/args.dart'; | 34 import 'package:args/args.dart'; |
| 35 import 'package:front_end/src/incremental/byte_store.dart'; |
36 import 'package:package_config/packages.dart'; | 36 import 'package:package_config/packages.dart'; |
37 import 'package:package_config/packages_file.dart'; | 37 import 'package:package_config/packages_file.dart'; |
38 import 'package:package_config/src/packages_impl.dart'; | 38 import 'package:package_config/src/packages_impl.dart'; |
39 import 'package:path/src/context.dart'; | 39 import 'package:path/src/context.dart'; |
40 import 'package:yaml/yaml.dart'; | 40 import 'package:yaml/yaml.dart'; |
41 | 41 |
42 /** | 42 /** |
43 * A utility class used to build an analysis context for a given directory. | 43 * A utility class used to build an analysis context for a given directory. |
44 * | 44 * |
45 * The construction of analysis contexts is as follows: | 45 * The construction of analysis contexts is as follows: |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 throw new ArgumentError('not absolute: $path'); | 817 throw new ArgumentError('not absolute: $path'); |
818 } | 818 } |
819 path = context.normalize(path); | 819 path = context.normalize(path); |
820 Resource resource = provider.getResource(path); | 820 Resource resource = provider.getResource(path); |
821 if (resource is File) { | 821 if (resource is File) { |
822 path = resource.parent.path; | 822 path = resource.parent.path; |
823 } | 823 } |
824 return new _BasicWorkspace._(provider, path, builder); | 824 return new _BasicWorkspace._(provider, path, builder); |
825 } | 825 } |
826 } | 826 } |
OLD | NEW |