Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/CorrectionUtils.java |
| diff --git a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/CorrectionUtils.java b/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/CorrectionUtils.java |
| index 1c23f406b64b1331871f8bf4093272d5f2cf96f7..e19c2895017b4d12e6db8874aa9a02018d20d568 100644 |
| --- a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/CorrectionUtils.java |
| +++ b/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/CorrectionUtils.java |
| @@ -382,7 +382,7 @@ public class CorrectionUtils { |
| * <code>null</code> in the other case. |
| */ |
| public static VariableElement getLocalOrParameterVariableElement(SimpleIdentifier node) { |
| - Element element = node.getElement(); |
| + Element element = node.getStaticElement(); |
| if (element instanceof LocalVariableElement) { |
| return (LocalVariableElement) element; |
| } |
| @@ -397,7 +397,7 @@ public class CorrectionUtils { |
| * local variable, or <code>null</code> in the other case. |
| */ |
| public static LocalVariableElement getLocalVariableElement(SimpleIdentifier node) { |
| - Element element = node.getElement(); |
| + Element element = node.getStaticElement(); |
| if (element instanceof LocalVariableElement) { |
| return (LocalVariableElement) element; |
| } |
| @@ -451,7 +451,7 @@ public class CorrectionUtils { |
| * parameter, or <code>null</code> in the other case. |
| */ |
| public static ParameterElement getParameterElement(SimpleIdentifier node) { |
| - Element element = node.getElement(); |
| + Element element = node.getStaticElement(); |
| if (element instanceof ParameterElement) { |
| return (ParameterElement) element; |
| } |
| @@ -517,7 +517,7 @@ public class CorrectionUtils { |
| * to property, or <code>null</code> in the other case. |
| */ |
| public static PropertyAccessorElement getPropertyAccessorElement(SimpleIdentifier node) { |
| - Element element = node.getElement(); |
| + Element element = node.getStaticElement(); // TODO(brianwilkerson) Use getBestElement? |
|
scheglov
2013/08/19 21:47:02
This method is used currently only at places where
Brian Wilkerson
2013/08/20 18:22:38
OK. Comment removed.
|
| if (element instanceof PropertyAccessorElement) { |
| return (PropertyAccessorElement) element; |
| } |