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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java

Issue 22854024: Rename Identifier.getElement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: clean-up and fix Created 7 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
index 1ed4b6042edb618803957d7cbfbc85d841344205..a511af467bb16f45f684286e8ec8f3f3f227b275 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
@@ -180,7 +180,7 @@ public class ConstantVisitor extends GeneralizingASTVisitor<EvaluationResultImpl
// TODO(brianwilkerson) Figure out which error to report.
return error(node, null);
}
- ConstructorElement constructor = node.getElement();
+ ConstructorElement constructor = node.getStaticElement();
if (constructor != null && constructor.isConst()) {
node.getArgumentList().accept(this);
return ValidResult.RESULT_OBJECT;
@@ -238,7 +238,7 @@ public class ConstantVisitor extends GeneralizingASTVisitor<EvaluationResultImpl
@Override
public EvaluationResultImpl visitMethodInvocation(MethodInvocation node) {
- Element element = node.getMethodName().getElement();
+ Element element = node.getMethodName().getStaticElement();
if (element instanceof FunctionElement) {
FunctionElement function = (FunctionElement) element;
if (function.getName().equals("identical")) {
@@ -280,7 +280,7 @@ public class ConstantVisitor extends GeneralizingASTVisitor<EvaluationResultImpl
public EvaluationResultImpl visitPrefixedIdentifier(PrefixedIdentifier node) {
// validate prefix
SimpleIdentifier prefixNode = node.getPrefix();
- Element prefixElement = prefixNode.getElement();
+ Element prefixElement = prefixNode.getStaticElement();
if (!(prefixElement instanceof PrefixElement)) {
EvaluationResultImpl prefixResult = prefixNode.accept(this);
if (!(prefixResult instanceof ValidResult)) {
@@ -288,7 +288,7 @@ public class ConstantVisitor extends GeneralizingASTVisitor<EvaluationResultImpl
}
}
// validate prefixed identifier
- return getConstantValue(node, node.getElement());
+ return getConstantValue(node, node.getStaticElement());
}
@Override
@@ -311,12 +311,12 @@ public class ConstantVisitor extends GeneralizingASTVisitor<EvaluationResultImpl
@Override
public EvaluationResultImpl visitPropertyAccess(PropertyAccess node) {
- return getConstantValue(node, node.getPropertyName().getElement());
+ return getConstantValue(node, node.getPropertyName().getStaticElement());
}
@Override
public EvaluationResultImpl visitSimpleIdentifier(SimpleIdentifier node) {
- return getConstantValue(node, node.getElement());
+ return getConstantValue(node, node.getStaticElement());
}
@Override

Powered by Google App Engine
This is Rietveld 408576698