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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/LibraryImportScope.java

Issue 700943003: Fix issue 19424 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up Created 6 years, 1 month 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/LibraryImportScope.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/LibraryImportScope.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/LibraryImportScope.java
index d92d959c693c12d0ba83b05303dcee5caaf8d893..236afd9d5a85df1900472e686bd3688f79daae90 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/LibraryImportScope.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/LibraryImportScope.java
@@ -14,6 +14,7 @@
package com.google.dart.engine.internal.scope;
import com.google.dart.engine.AnalysisEngine;
+import com.google.dart.engine.ast.AstNode;
import com.google.dart.engine.ast.Identifier;
import com.google.dart.engine.element.Element;
import com.google.dart.engine.element.ImportElement;
@@ -22,6 +23,7 @@ import com.google.dart.engine.error.AnalysisError;
import com.google.dart.engine.error.AnalysisErrorListener;
import com.google.dart.engine.error.StaticWarningCode;
import com.google.dart.engine.internal.element.MultiplyDefinedElementImpl;
+import com.google.dart.engine.source.Source;
import com.google.dart.engine.utilities.general.StringUtilities;
import java.util.ArrayList;
@@ -76,6 +78,15 @@ public class LibraryImportScope extends Scope {
}
@Override
+ protected Source getSource(AstNode node) {
+ Source source = super.getSource(node);
+ if (source == null) {
+ source = definingLibrary.getDefiningCompilationUnit().getSource();
+ }
+ return source;
+ }
+
+ @Override
protected Element internalLookup(Identifier identifier, String name,
LibraryElement referencingLibrary) {
Element foundElement = localLookup(name, referencingLibrary);

Powered by Google App Engine
This is Rietveld 408576698