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 'package:args/args.dart' show ArgParser, ArgResults; | 5 import 'package:args/args.dart' show ArgParser, ArgResults; |
6 import 'package:analyzer/src/command_line/arguments.dart'; | 6 import 'package:analyzer/src/command_line/arguments.dart'; |
7 import 'package:analyzer/file_system/file_system.dart' | 7 import 'package:analyzer/file_system/file_system.dart' |
8 show ResourceProvider, ResourceUriResolver; | 8 show ResourceProvider, ResourceUriResolver; |
9 import 'package:analyzer/file_system/physical_file_system.dart' | 9 import 'package:analyzer/file_system/physical_file_system.dart' |
10 show PhysicalResourceProvider; | 10 show PhysicalResourceProvider; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 ContextBuilderOptions builderOptions = new ContextBuilderOptions(); | 145 ContextBuilderOptions builderOptions = new ContextBuilderOptions(); |
146 if (options.packageRoot != null) { | 146 if (options.packageRoot != null) { |
147 builderOptions.defaultPackagesDirectoryPath = options.packageRoot; | 147 builderOptions.defaultPackagesDirectoryPath = options.packageRoot; |
148 } | 148 } |
149 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null, | 149 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null, |
150 options: builderOptions); | 150 options: builderOptions); |
151 return new PackageMapUriResolver(resourceProvider, | 151 return new PackageMapUriResolver(resourceProvider, |
152 builder.convertPackagesToMap(builder.createPackageMap(''))); | 152 builder.convertPackagesToMap(builder.createPackageMap(''))); |
153 } | 153 } |
154 | 154 |
155 return [new ResourceUriResolver(resourceProvider), packageResolver()]; | 155 return [packageResolver(), new ResourceUriResolver(resourceProvider)]; |
156 } | 156 } |
OLD | NEW |