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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2554113003: Implement 'Import Library' Quick Fix for project libraries using TopLevelDeclarationInSource. (Closed)
Patch Set: Created 4 years 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/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 1a9cabf56dc5623f06e965955f12a664e5de4bb1..ae37536104a8ed69d1fd1601099d93804123a636 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -1468,11 +1468,15 @@ class _TopLevelNameDeclarationsTask {
if (checkedFiles.add(path)) {
FileState file = driver._fsState.getFileForPath(path);
if (!file.isPart) {
- TopLevelDeclaration declaration =
- file.exportedTopLevelDeclarations[name];
+ bool isExported = false;
+ TopLevelDeclaration declaration = file.topLevelDeclarations[name];
+ if (declaration == null) {
+ declaration = file.exportedTopLevelDeclarations[name];
+ isExported = true;
+ }
if (declaration != null) {
- libraryDeclarations
- .add(new TopLevelDeclarationInSource(file.source, declaration));
+ libraryDeclarations.add(new TopLevelDeclarationInSource(
+ file.source, declaration, isExported));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698