| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 /// module root directory. | 118 /// module root directory. |
| 119 /// | 119 /// |
| 120 /// Removes any explicit module names from [summaryPaths] and populates with | 120 /// Removes any explicit module names from [summaryPaths] and populates with |
| 121 /// [customSummaryModules] with them. | 121 /// [customSummaryModules] with them. |
| 122 void _parseCustomSummaryModules() { | 122 void _parseCustomSummaryModules() { |
| 123 for (var i = 0; i < summaryPaths.length; i++) { | 123 for (var i = 0; i < summaryPaths.length; i++) { |
| 124 var summaryPath = summaryPaths[i]; | 124 var summaryPath = summaryPaths[i]; |
| 125 var pipe = summaryPath.indexOf("="); | 125 var pipe = summaryPath.indexOf("="); |
| 126 if (pipe != -1) { | 126 if (pipe != -1) { |
| 127 summaryPaths[i] = summaryPath.substring(0, pipe); | 127 summaryPaths[i] = summaryPath.substring(0, pipe); |
| 128 customSummaryModules[summaryPaths[i]] = | 128 customSummaryModules[summaryPaths[i]] = summaryPath.substring(pipe + 1); |
| 129 summaryPath.substring(pipe + 1); | |
| 130 } | 129 } |
| 131 } | 130 } |
| 132 } | 131 } |
| 133 } | 132 } |
| 134 | 133 |
| 135 /// Creates a SourceFactory configured by the [options]. | 134 /// Creates a SourceFactory configured by the [options]. |
| 136 /// | 135 /// |
| 137 /// If supplied, [fileResolvers] will override the default `file:` and | 136 /// If supplied, [fileResolvers] will override the default `file:` and |
| 138 /// `package:` URI resolvers. | 137 /// `package:` URI resolvers. |
| 139 SourceFactory createSourceFactory(AnalyzerOptions options, | 138 SourceFactory createSourceFactory(AnalyzerOptions options, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 168 builderOptions.defaultPackagesDirectoryPath = options.packageRoot; | 167 builderOptions.defaultPackagesDirectoryPath = options.packageRoot; |
| 169 } | 168 } |
| 170 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null, | 169 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null, |
| 171 options: builderOptions); | 170 options: builderOptions); |
| 172 return new PackageMapUriResolver(resourceProvider, | 171 return new PackageMapUriResolver(resourceProvider, |
| 173 builder.convertPackagesToMap(builder.createPackageMap(''))); | 172 builder.convertPackagesToMap(builder.createPackageMap(''))); |
| 174 } | 173 } |
| 175 | 174 |
| 176 return [new ResourceUriResolver(resourceProvider), packageResolver()]; | 175 return [new ResourceUriResolver(resourceProvider), packageResolver()]; |
| 177 } | 176 } |
| OLD | NEW |