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

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

Issue 1816163002: Issue 26050. Don't suggest to import an already imported (with 'show') library again. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/analysis_server/test/services/correction/fix_test.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 dbf0da7302499f9c0bfd9712fa1ce8e9449a98cd..6c3a1e6e9f1d4e526eb0b7cadab4c9992b70cf6a 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1494,6 +1494,10 @@ class FixProcessor {
String libraryUri = sdkLibrary.shortName;
Source librarySource =
sdkSourceFactory.resolveUri(unitSource, libraryUri);
+ // maybe already imported
+ if (alreadyImportedWithPrefix.contains(librarySource)) {
+ continue;
+ }
// prepare LibraryElement
LibraryElement libraryElement =
context.getResult(librarySource, LIBRARY_ELEMENT1);
@@ -1523,7 +1527,7 @@ class FixProcessor {
if (librarySource.isInSystemLibrary) {
continue;
}
- // maybe already imported with a prefix
+ // maybe already imported
if (alreadyImportedWithPrefix.contains(librarySource)) {
continue;
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/fix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698