| Index: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
|
| diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
|
| index d81910e647e3454ac5d0e0c150b9a0e194f082e5..e46a75aca74ccd5581cccf96fac96e181b78e11e 100644
|
| --- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
|
| +++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java
|
| @@ -29,6 +29,7 @@ import com.google.dart.engine.ast.CompilationUnitMember;
|
| import com.google.dart.engine.ast.ConstructorDeclaration;
|
| import com.google.dart.engine.ast.Expression;
|
| import com.google.dart.engine.ast.FieldDeclaration;
|
| +import com.google.dart.engine.ast.ForEachStatement;
|
| import com.google.dart.engine.ast.FormalParameter;
|
| import com.google.dart.engine.ast.FormalParameterList;
|
| import com.google.dart.engine.ast.Identifier;
|
| @@ -251,6 +252,19 @@ public class Context {
|
| }
|
|
|
| @Override
|
| + public Void visitForEachStatement(ForEachStatement node) {
|
| + SimpleIdentifier nameNode = node.getLoopVariable().getIdentifier();
|
| + String variableName = nameNode.getName();
|
| + if (forbiddenNames.contains(variableName)) {
|
| + ensureHierarchyNames(node);
|
| + ensureMethodNames(node);
|
| + String newName = generateUniqueVariableName(variableName);
|
| + renameIdentifier(nameNode, newName);
|
| + }
|
| + return super.visitForEachStatement(node);
|
| + }
|
| +
|
| + @Override
|
| public Void visitMethodDeclaration(MethodDeclaration node) {
|
| methodNames = null;
|
| try {
|
|
|