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

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

Issue 2232863004: Create new error message for missing generated files (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/analysis_server/lib/src/services/correction/organize_directives.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
index 0d355668c424ff8fef5bdb953be6f67776ebf2ad..56d4bb092665c3edfd5c84dd39d68d535d058e31 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
@@ -47,7 +47,9 @@ class DirectiveOrganizer {
bool _isUnresolvedUri(UriBasedDirective directive) {
for (AnalysisError error in errors) {
- if (error.errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST &&
+ ErrorCode errorCode = error.errorCode;
+ if ((errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST ||
+ errorCode == CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED) &&
directive.uri.offset == error.offset) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698