| 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:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 * then both will be printed. If [printMode] is `2`, then only performance | 133 * then both will be printed. If [printMode] is `2`, then only performance |
| 134 * information will be printed, and it will be marked as being for a cold VM. | 134 * information will be printed, and it will be marked as being for a cold VM. |
| 135 */ | 135 */ |
| 136 ErrorSeverity analyzeSync({int printMode: 1}) { | 136 ErrorSeverity analyzeSync({int printMode: 1}) { |
| 137 setupForAnalysis(); | 137 setupForAnalysis(); |
| 138 return _analyzeSync(printMode); | 138 return _analyzeSync(printMode); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void prepareAnalysisContext(JavaFile sourceFile, Source source) { | 141 void prepareAnalysisContext(JavaFile sourceFile, Source source) { |
| 142 List<UriResolver> resolvers = [ | 142 List<UriResolver> resolvers = [ |
| 143 new CustomUriResolver(options.customUrlMappings), |
| 143 new DartUriResolver(sdk), | 144 new DartUriResolver(sdk), |
| 144 new FileUriResolver()]; | 145 new FileUriResolver()]; |
| 145 // may be add package resolver | 146 // may be add package resolver |
| 146 { | 147 { |
| 147 JavaFile packageDirectory; | 148 JavaFile packageDirectory; |
| 148 if (options.packageRootPath != null) { | 149 if (options.packageRootPath != null) { |
| 149 packageDirectory = new JavaFile(options.packageRootPath); | 150 packageDirectory = new JavaFile(options.packageRootPath); |
| 150 resolvers.add(new PackageUriResolver([packageDirectory])); | 151 resolvers.add(new PackageUriResolver([packageDirectory])); |
| 151 } else { | 152 } else { |
| 152 PubPackageMapProvider pubPackageMapProvider = | 153 PubPackageMapProvider pubPackageMapProvider = |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 } | 431 } |
| 431 } | 432 } |
| 432 | 433 |
| 433 @override | 434 @override |
| 434 void logInformation2(String message, Object exception) { | 435 void logInformation2(String message, Object exception) { |
| 435 if (log) { | 436 if (log) { |
| 436 stdout.writeln(message); | 437 stdout.writeln(message); |
| 437 } | 438 } |
| 438 } | 439 } |
| 439 } | 440 } |
| OLD | NEW |