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

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

Issue 47543010: Issue 14580. Fix for Source in which problem is reported. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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: 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 67b59594c7ff6938e02137c214a7658753df9f57..94e7e2d343c6fb518bfc62edbe552c3abd5c3b8c 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,9 +14,7 @@
package com.google.dart.engine.internal.scope;
import com.google.dart.engine.AnalysisEngine;
-import com.google.dart.engine.ast.CompilationUnit;
import com.google.dart.engine.ast.Identifier;
-import com.google.dart.engine.element.CompilationUnitElement;
import com.google.dart.engine.element.Element;
import com.google.dart.engine.element.ImportElement;
import com.google.dart.engine.element.LibraryElement;
@@ -24,7 +22,6 @@ 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 java.util.ArrayList;
@@ -72,11 +69,6 @@ public class LibraryImportScope extends Scope {
}
@Override
- public LibraryElement getDefiningLibrary() {
- return definingLibrary;
- }
-
- @Override
public AnalysisErrorListener getErrorListener() {
return errorListener;
}
@@ -159,27 +151,6 @@ public class LibraryImportScope extends Scope {
}
/**
- * Return the source that contains the given identifier, or the source associated with this scope
- * if the source containing the identifier could not be determined.
- *
- * @param identifier the identifier whose source is to be returned
- * @return the source that contains the given identifier
- */
- private Source getSource(Identifier identifier) {
- CompilationUnit unit = identifier.getAncestor(CompilationUnit.class);
- if (unit != null) {
- CompilationUnitElement element = unit.getElement();
- if (element != null) {
- Source source = element.getSource();
- if (source != null) {
- return source;
- }
- }
- }
- return getSource();
- }
-
- /**
* Given a collection of elements that a single name could all be mapped to, remove from the list
* all of the names defined in the SDK. Return the element(s) that remain.
*

Powered by Google App Engine
This is Rietveld 408576698