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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 1147733002: Use short names in 'Create File' Quick Fix messages. (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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 1b83ef5b6433a07eb420d5832eb948db48822958..1c7e134d39a819dcd4f7981d18613f45e54b4989 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -923,8 +923,8 @@ class FixProcessor {
libName = libName.replaceAll('_', '.');
SourceEdit edit = new SourceEdit(0, 0, 'library $libName;$eol$eol');
doSourceChange_addSourceEdit(change, context, source, edit);
+ _addFix(DartFixKind.CREATE_FILE, [source.shortName]);
}
- _addFix(DartFixKind.CREATE_FILE, [file]);
}
}
}
@@ -1123,11 +1123,10 @@ class FixProcessor {
PartDirective partDirective = node.parent;
Source source = partDirective.source;
if (source != null) {
- String file = source.fullName;
String libName = unitLibraryElement.name;
SourceEdit edit = new SourceEdit(0, 0, 'part of $libName;$eol$eol');
doSourceChange_addSourceEdit(change, context, source, edit);
- _addFix(DartFixKind.CREATE_FILE, [file]);
+ _addFix(DartFixKind.CREATE_FILE, [source.shortName]);
}
}
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698