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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/indexer/contributor/TypeReferencesContributor.java

Issue 9633009: Use Element instead of Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/indexer/contributor/TypeReferencesContributor.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/indexer/contributor/TypeReferencesContributor.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/indexer/contributor/TypeReferencesContributor.java
index 887c2dc987cf22359070cee0246069d59ca61317..caae3d9fa7ff6d302227c96f15a3b3a8aac21f06 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/indexer/contributor/TypeReferencesContributor.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/indexer/contributor/TypeReferencesContributor.java
@@ -16,8 +16,8 @@ package com.google.dart.tools.core.internal.indexer.contributor;
import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartTypeNode;
-import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.resolver.ClassElement;
+import com.google.dart.compiler.resolver.Element;
import com.google.dart.compiler.type.InterfaceType;
import com.google.dart.tools.core.DartCore;
import com.google.dart.tools.core.internal.indexer.location.TypeLocation;
@@ -32,11 +32,11 @@ import com.google.dart.tools.core.model.Type;
public class TypeReferencesContributor extends ScopedDartContributor {
@Override
public Void visitIdentifier(DartIdentifier node) {
- Symbol binding = node.getReferencedElement();
- if (binding == null) {
- binding = node.getTargetSymbol();
+ Element element = node.getElement();
+ if (element == null) {
+ element = node.getElement();
}
- if (binding == null) {
+ if (element == null) {
DartNode parent = node.getParent();
if (parent instanceof DartTypeNode) {
com.google.dart.compiler.type.Type type = ((DartTypeNode) parent).getType();
@@ -44,8 +44,8 @@ public class TypeReferencesContributor extends ScopedDartContributor {
processType(node, (InterfaceType) type);
}
}
- } else if (binding instanceof ClassElement) {
- process(node, (ClassElement) binding);
+ } else if (element instanceof ClassElement) {
+ process(node, (ClassElement) element);
}
return super.visitIdentifier(node);
}

Powered by Google App Engine
This is Rietveld 408576698