| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_impl; | 5 library analyzer_impl; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'generated/constant.dart'; | 10 import 'generated/constant.dart'; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // may be add package resolver | 243 // may be add package resolver |
| 244 { | 244 { |
| 245 JavaFile packageDirectory; | 245 JavaFile packageDirectory; |
| 246 if (options.packageRootPath != null) { | 246 if (options.packageRootPath != null) { |
| 247 packageDirectory = new JavaFile(options.packageRootPath); | 247 packageDirectory = new JavaFile(options.packageRootPath); |
| 248 resolvers.add(new PackageUriResolver([packageDirectory])); | 248 resolvers.add(new PackageUriResolver([packageDirectory])); |
| 249 } else { | 249 } else { |
| 250 PubPackageMapProvider pubPackageMapProvider = | 250 PubPackageMapProvider pubPackageMapProvider = |
| 251 new PubPackageMapProvider(PhysicalResourceProvider.INSTANCE, sdk); | 251 new PubPackageMapProvider(PhysicalResourceProvider.INSTANCE, sdk); |
| 252 PackageMapInfo packageMapInfo = pubPackageMapProvider.computePackageMap( | 252 PackageMapInfo packageMapInfo = pubPackageMapProvider.computePackageMap( |
| 253 PhysicalResourceProvider.INSTANCE.getResource('')); | 253 PhysicalResourceProvider.INSTANCE.getResource('.')); |
| 254 resolvers.add( | 254 resolvers.add( |
| 255 new PackageMapUriResolver( | 255 new PackageMapUriResolver( |
| 256 PhysicalResourceProvider.INSTANCE, | 256 PhysicalResourceProvider.INSTANCE, |
| 257 packageMapInfo.packageMap)); | 257 packageMapInfo.packageMap)); |
| 258 } | 258 } |
| 259 } | 259 } |
| 260 sourceFactory = new SourceFactory(resolvers); | 260 sourceFactory = new SourceFactory(resolvers); |
| 261 context = AnalysisEngine.instance.createAnalysisContext(); | 261 context = AnalysisEngine.instance.createAnalysisContext(); |
| 262 context.sourceFactory = sourceFactory; | 262 context.sourceFactory = sourceFactory; |
| 263 Map<String, String> definedVariables = options.definedVariables; | 263 Map<String, String> definedVariables = options.definedVariables; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } | 401 } |
| 402 } | 402 } |
| 403 | 403 |
| 404 @override | 404 @override |
| 405 void logInformation2(String message, Exception exception) { | 405 void logInformation2(String message, Exception exception) { |
| 406 if (log) { | 406 if (log) { |
| 407 stdout.writeln(message); | 407 stdout.writeln(message); |
| 408 } | 408 } |
| 409 } | 409 } |
| 410 } | 410 } |
| OLD | NEW |