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

Side by Side Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1310263003: Reformat code to minimize churn (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 context.directory.manager; 5 library context.directory.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core' hide Resource; 10 import 'dart:core' hide Resource;
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 final String packageRoot; 1350 final String packageRoot;
1351 1351
1352 PackageMapDisposition(this.packageMap, {this.packageRoot}); 1352 PackageMapDisposition(this.packageMap, {this.packageRoot});
1353 1353
1354 @override 1354 @override
1355 Packages get packages => null; 1355 Packages get packages => null;
1356 1356
1357 @override 1357 @override
1358 Iterable<UriResolver> createPackageUriResolvers( 1358 Iterable<UriResolver> createPackageUriResolvers(
1359 ResourceProvider resourceProvider) => 1359 ResourceProvider resourceProvider) =>
1360 <UriResolver>[new SdkExtUriResolver(packageMap), 1360 <UriResolver>[
1361 new PackageMapUriResolver(resourceProvider, packageMap)]; 1361 new SdkExtUriResolver(packageMap),
1362 new PackageMapUriResolver(resourceProvider, packageMap)
1363 ];
1362 } 1364 }
1363 1365
1364 /** 1366 /**
1365 * Concrete [FolderDisposition] object indicating that the context for a given 1367 * Concrete [FolderDisposition] object indicating that the context for a given
1366 * folder should resolve packages using a ".packages" file. 1368 * folder should resolve packages using a ".packages" file.
1367 */ 1369 */
1368 class PackagesFileDisposition extends FolderDisposition { 1370 class PackagesFileDisposition extends FolderDisposition {
1369 @override 1371 @override
1370 final Packages packages; 1372 final Packages packages;
1371 1373
1372 PackagesFileDisposition(this.packages) {} 1374 PackagesFileDisposition(this.packages) {}
1373 1375
1374 @override 1376 @override
1375 String get packageRoot => null; 1377 String get packageRoot => null;
1376 1378
1377 @override 1379 @override
1378 Iterable<UriResolver> createPackageUriResolvers( 1380 Iterable<UriResolver> createPackageUriResolvers(
1379 ResourceProvider resourceProvider) { 1381 ResourceProvider resourceProvider) {
1380 if (packages != null) { 1382 if (packages != null) {
1381 // Construct package map for the SdkExtUriResolver. 1383 // Construct package map for the SdkExtUriResolver.
1382 Map<String, List<Folder>> packageMap = <String, List<Folder>>{}; 1384 Map<String, List<Folder>> packageMap = <String, List<Folder>>{};
1383 packages.asMap().forEach((String name, Uri uri) { 1385 packages.asMap().forEach((String name, Uri uri) {
1384 if (uri.scheme == 'file' || uri.scheme == '' /* unspecified */) { 1386 if (uri.scheme == 'file' || uri.scheme == '' /* unspecified */) {
1385 var path = resourceProvider.pathContext.fromUri(uri); 1387 var path = resourceProvider.pathContext.fromUri(uri);
1386 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; 1388 packageMap[name] = <Folder>[resourceProvider.getFolder(path)];
1387 } 1389 }
1388 }); 1390 });
1389 return <UriResolver>[new SdkExtUriResolver(packageMap)]; 1391 return <UriResolver>[new SdkExtUriResolver(packageMap)];
1390 } else { 1392 } else {
1391 return const <UriResolver>[]; 1393 return const <UriResolver>[];
1392 } 1394 }
1393 } 1395 }
1394 } 1396 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_logger.dart ('k') | pkg/analysis_server/lib/src/domain_completion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698