Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1543)

Side by Side Diff: pkg/analyzer/lib/src/context/source.dart

Issue 1842563003: Format everything in analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 library analyzer.src.context.source; 5 library analyzer.src.context.source;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/physical_file_system.dart'; 8 import 'package:analyzer/file_system/physical_file_system.dart';
9 import 'package:analyzer/source/package_map_resolver.dart'; 9 import 'package:analyzer/source/package_map_resolver.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 * @throws AnalysisException if either the contained URI is invalid or if it 279 * @throws AnalysisException if either the contained URI is invalid or if it
280 * cannot be resolved against the source object's URI 280 * cannot be resolved against the source object's URI
281 */ 281 */
282 Source _internalResolveUri(Source containingSource, Uri containedUri) { 282 Source _internalResolveUri(Source containingSource, Uri containedUri) {
283 if (!containedUri.isAbsolute) { 283 if (!containedUri.isAbsolute) {
284 if (containingSource == null) { 284 if (containingSource == null) {
285 throw new AnalysisException( 285 throw new AnalysisException(
286 "Cannot resolve a relative URI without a containing source: " 286 "Cannot resolve a relative URI without a containing source: "
287 "$containedUri"); 287 "$containedUri");
288 } 288 }
289 containedUri = utils.resolveRelativeUri(containingSource.uri, containedUri ); 289 containedUri =
290 utils.resolveRelativeUri(containingSource.uri, containedUri);
290 } 291 }
291 292
292 Uri actualUri = containedUri; 293 Uri actualUri = containedUri;
293 294
294 // Check .packages and update target and actual URIs as appropriate. 295 // Check .packages and update target and actual URIs as appropriate.
295 if (_packages != null && containedUri.scheme == 'package') { 296 if (_packages != null && containedUri.scheme == 'package') {
296 Uri packageUri = null; 297 Uri packageUri = null;
297 try { 298 try {
298 packageUri = 299 packageUri =
299 _packages.resolve(containedUri, notFound: (Uri packageUri) => null); 300 _packages.resolve(containedUri, notFound: (Uri packageUri) => null);
(...skipping 13 matching lines...) Expand all
313 for (UriResolver resolver in resolvers) { 314 for (UriResolver resolver in resolvers) {
314 Source result = resolver.resolveAbsolute(containedUri, actualUri); 315 Source result = resolver.resolveAbsolute(containedUri, actualUri);
315 if (result != null) { 316 if (result != null) {
316 return result; 317 return result;
317 } 318 }
318 } 319 }
319 320
320 return null; 321 return null;
321 } 322 }
322 } 323 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698