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

Unified Diff: pkg/analyzer/lib/source/package_map_resolver.dart

Issue 975453004: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | pkg/analyzer/lib/source/pub_package_map_provider.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/package_map_resolver.dart
diff --git a/pkg/analyzer/lib/source/package_map_resolver.dart b/pkg/analyzer/lib/source/package_map_resolver.dart
index 7a2cc07ba301e5d1aad9c7aa396a77536656367b..dac2bb579fec469d2a5985af0addc8a28111e090 100644
--- a/pkg/analyzer/lib/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/source/package_map_resolver.dart
@@ -8,7 +8,6 @@ import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/util/asserts.dart' as asserts;
-
/**
* A [UriResolver] implementation for the `package:` scheme that uses a map of
* package names to their directories.
@@ -85,7 +84,8 @@ class PackageMapUriResolver extends UriResolver {
Folder pkgFolder = pkgFolders[i];
String pkgFolderPath = pkgFolder.path;
// TODO(paulberry): figure out the right thing to do for Windows.
- if (pkgFolderPath.length > bestMatchLength && sourcePath.startsWith(pkgFolderPath + '/')) {
+ if (pkgFolderPath.length > bestMatchLength &&
+ sourcePath.startsWith(pkgFolderPath + '/')) {
String relPath = sourcePath.substring(pkgFolderPath.length + 1);
if (_isReversibleTranslation(pkgFolders, i, relPath)) {
bestMatch = Uri.parse('$PACKAGE_SCHEME:$pkgName/$relPath');
@@ -104,8 +104,8 @@ class PackageMapUriResolver extends UriResolver {
* that is, whether translating the package URI pack to a file path will
* produce the file path we started with.
*/
- bool _isReversibleTranslation(List<Folder> packageDirs, int packageDirIndex,
- String relPath) {
+ bool _isReversibleTranslation(
+ List<Folder> packageDirs, int packageDirIndex, String relPath) {
// The translation is reversible provided there is no prior element of
// [packageDirs] containing a file matching [relPath].
for (int i = 0; i < packageDirIndex; i++) {
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | pkg/analyzer/lib/source/pub_package_map_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698