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

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

Issue 1135073004: Fix for 'Create part' Quick Fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
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 58240c58bd1d6ddde05fa3e12ce50fdc85cf4350..1b0f82fde19b6a78277d3186458b253ca572b043 100644
--- a/pkg/analyzer/lib/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/source/package_map_resolver.dart
@@ -71,7 +71,10 @@ class PackageMapUriResolver extends UriResolver {
// Return a NonExistingSource instance.
// This helps provide more meaningful error messages to users
// (a missing file error, as opposed to an invalid URI error).
- return new NonExistingSource(uri.toString(), UriKind.PACKAGE_URI);
+ String fullPath = packageDirs != null && packageDirs.isNotEmpty
+ ? packageDirs.first.canonicalizePath(relPath)
+ : relPath;
+ return new NonExistingSource(fullPath, uri, UriKind.PACKAGE_URI);
}
@override
« no previous file with comments | « pkg/analysis_server/test/services/refactoring/move_file_test.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698