### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v retrieving revision 1.391 diff -u -r1.391 CompletionEngine.java --- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 27 Mar 2009 09:03:09 -0000 1.391 +++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 1 Apr 2009 12:20:37 -0000 @@ -3608,7 +3608,14 @@ switchStatement.expression.resolvedType != null) { addExpectedType(switchStatement.expression.resolvedType, scope); } - + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=253008, flag boolean as the expected + // type if we are completing inside if(), for (; ;), while() and do while() + } else if (parent instanceof WhileStatement) { // covers both while and do-while loops + addExpectedType(TypeBinding.BOOLEAN, scope); + } else if (parent instanceof IfStatement) { + addExpectedType(TypeBinding.BOOLEAN, scope); + } else if (parent instanceof ForStatement) { // astNodeParent set to ForStatement only for the condition + addExpectedType(TypeBinding.BOOLEAN, scope); // Expected types for javadoc } else if (parent instanceof Javadoc) { if (scope.kind == Scope.METHOD_SCOPE) { Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v retrieving revision 1.204 diff -u -r1.204 CompletionParser.java --- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 30 Mar 2009 05:50:42 -0000 1.204 +++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 1 Apr 2009 12:20:41 -0000 @@ -76,6 +76,7 @@ protected static final int K_MEMBER_VALUE_ARRAY_INITIALIZER = COMPLETION_PARSER + 37; protected static final int K_CONTROL_STATEMENT_DELIMITER = COMPLETION_PARSER + 38; protected static final int K_INSIDE_ASSERT_EXCEPTION = COMPLETION_PARSER + 39; + protected static final int K_INSIDE_FOR_CONDITIONAL = COMPLETION_PARSER + 40; public final static char[] FAKE_TYPE_NAME = new char[]{' '}; public final static char[] FAKE_METHOD_NAME = new char[]{' '}; @@ -979,6 +980,13 @@ WhileStatement whileStatement = new WhileStatement(expression, new EmptyStatement(expression.sourceEnd, expression.sourceEnd), expression.sourceStart, expression.sourceEnd); this.assistNodeParent = whileStatement; break nextElement; + case K_INSIDE_FOR_CONDITIONAL: // https://bugs.eclipse.org/bugs/show_bug.cgi?id=253008 + ForStatement forStatement = new ForStatement(new Statement[0], expression, new Statement[0], + new EmptyStatement(expression.sourceEnd, expression.sourceEnd), + false, + expression.sourceStart, expression.sourceEnd); + this.assistNodeParent = forStatement; + break nextElement; case K_BETWEEN_SWITCH_AND_RIGHT_PAREN: SwitchStatement switchStatement = new SwitchStatement(); switchStatement.expression = expression; @@ -3479,6 +3487,18 @@ popElement(K_INSIDE_CONTINUE_STATEMENT); } break; + case K_BETWEEN_FOR_AND_RIGHT_PAREN: + if(topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) == this.bracketDepth - 1) { + popElement(K_BETWEEN_FOR_AND_RIGHT_PAREN); + pushOnElementStack(K_INSIDE_FOR_CONDITIONAL, this.bracketDepth - 1); + } + break; + case K_INSIDE_FOR_CONDITIONAL: + if(topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) == this.bracketDepth - 1) { + popElement(K_INSIDE_FOR_CONDITIONAL); + pushOnElementStack(K_BETWEEN_FOR_AND_RIGHT_PAREN, this.bracketDepth - 1); + } + break; } break; case TokenNamereturn: #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/model/CompletionTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java,v retrieving revision 1.198 diff -u -r1.198 CompletionTests.java --- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 30 Mar 2009 05:50:38 -0000 1.198 +++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 1 Apr 2009 12:20:53 -0000 @@ -2265,7 +2265,8 @@ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); - int relevance1 = R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED; + int relevance1 = R_DEFAULT + R_RESOLVED + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_NON_STATIC + R_NON_RESTRICTED; + int relevance2 = R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_STATIC + R_NON_RESTRICTED; int start1 = str.lastIndexOf("equal") + "".length(); int end1 = start1 + "equal".length(); int start2 = str.lastIndexOf("a.equal"); @@ -2273,8 +2274,8 @@ int start3 = str.lastIndexOf("a."); int end3 = start3 + "a".length(); assertResults( - "equals[METHOD_REF]{equals(), Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, (obj), replace["+start1+", "+end1+"], token["+start1+", "+end1+"], " + (relevance1) + "}\n" + - "equalsFoo[METHOD_REF_WITH_CASTED_RECEIVER]{((CompletionAfterInstanceOf)a).equalsFoo(), Ltest.CompletionAfterInstanceOf;, ()V, Ltest.CompletionAfterInstanceOf;, equalsFoo, null, replace["+start2+", "+end2+"], token["+start1+", "+end1+"], receiver["+start3+", "+end3+"], " + (relevance1) + "}", + "equalsFoo[METHOD_REF_WITH_CASTED_RECEIVER]{((CompletionAfterInstanceOf)a).equalsFoo(), Ltest.CompletionAfterInstanceOf;, ()V, Ltest.CompletionAfterInstanceOf;, equalsFoo, null, replace["+start2+", "+end2+"], token["+start1+", "+end1+"], receiver["+start3+", "+end3+"], " + (relevance2) + "}\n" + + "equals[METHOD_REF]{equals(), Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, (obj), replace["+start1+", "+end1+"], token["+start1+", "+end1+"], " + (relevance1) + "}", requestor.getResults()); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=193909 @@ -8120,7 +8121,7 @@ cu.codeComplete(cursorLocation, requestor); assertEquals( - "element:false completion:false relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), + "element:false completion:false relevance:"+(R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), requestor.getResults()); } public void testCompletionKeywordFalse3() throws JavaModelException { @@ -8146,7 +8147,7 @@ cu.codeComplete(cursorLocation, requestor); assertEquals( - "element:false completion:false relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), + "element:false completion:false relevance:"+(R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), requestor.getResults()); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=95008 @@ -11585,7 +11586,7 @@ cu.codeComplete(cursorLocation, requestor); assertEquals( - "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), + "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), requestor.getResults()); } public void testCompletionKeywordTrue3() throws JavaModelException { @@ -11611,7 +11612,7 @@ cu.codeComplete(cursorLocation, requestor); assertEquals( - "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), + "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), requestor.getResults()); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=90615 @@ -11718,7 +11719,7 @@ cu.codeComplete(cursorLocation, requestor); assertEquals( - "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), + "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), requestor.getResults()); } public void testCompletionKeywordTry3() throws JavaModelException { @@ -11757,7 +11758,7 @@ cu.codeComplete(cursorLocation, requestor); assertEquals( - "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), + "element:true completion:true relevance:"+(R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED), requestor.getResults()); } public void testCompletionKeywordTry6() throws JavaModelException { @@ -18826,8 +18827,8 @@ this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); assertResults( - "zzzz1[LOCAL_VARIABLE_REF]{zzzz1, null, Z, zzzz1, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_RESOLVED + R_NON_RESTRICTED) + "}\n" + - "zzzz2[LOCAL_VARIABLE_REF]{zzzz2, null, Z, zzzz2, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_RESOLVED + R_NON_RESTRICTED) + "}", + "zzzz1[LOCAL_VARIABLE_REF]{zzzz1, null, Z, zzzz1, null, " + (R_DEFAULT + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_RESOLVED + R_NON_RESTRICTED) + "}\n" + + "zzzz2[LOCAL_VARIABLE_REF]{zzzz2, null, Z, zzzz2, null, " + (R_DEFAULT + R_INTERESTING + R_EXACT_EXPECTED_TYPE + R_CASE + R_UNQUALIFIED + R_RESOLVED + R_NON_RESTRICTED) + "}", requestor.getResults()); } public void testParameterNames1() throws CoreException, IOException { @@ -19874,4 +19875,192 @@ requestor.getResults()); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=253008, prefer boolean proposal inside if(), while() etc +public void test253008() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "public class Test253008 {\n" + + " boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " if (methodR) {\n" + + " return 0;\n" + + " }\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + +public void test253008b() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "public class Test253008 {\n" + + " boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " while (methodR) {\n" + + " return 0;\n" + + " }\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + +public void test253008c() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "public class Test253008 {\n" + + " boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " do { \n" + + " } while (methodR);\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + +public void test253008d() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "public class Test253008 {\n" + + " boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " for (int i = 0; methodR; i++) {\n" + + " }\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + +public void test253008e() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "public class Test253008 {\n" + + " boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " for (methodR; true;) {\n" + + " }\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + +public void test253008f() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "public class Test253008 {\n" + + " boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " for (int i = 0; true; methodR) {\n" + + " }\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + +public void _test253008g() throws JavaModelException { + this.workingCopies = new ICompilationUnit[1]; + this.workingCopies[0] = getWorkingCopy( + "/Completion/src/test/Test269493.java", + "package test;" + + "import java.lang.Boolean;\n" + + "public class Test253008 {\n" + + " boolean methodReturningboolean() { return true; }\n" + + " Boolean methodReturningBoolean() { return true; }\n" + + " void methodReturningBlah() { return; }\n" + + " int foo(int p) {\n" + + " for (int i = 0; methodR; i++) {\n" + + " }\n" + + " }\n" + + "}\n"); + + CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(); + String str = this.workingCopies[0].getSource(); + String completeBehind = "methodR"; + int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); + + this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); + assertResults( + "methodReturningBlah[METHOD_REF]{methodReturningBlah(), Ltest.Test253008;, ()V, methodReturningBlah, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n" + + "methodReturningBoolean[METHOD_REF]{methodReturningBoolean(), Ltest.Test253008;, ()Z, methodReturningBoolean, " + (R_DEFAULT + R_RESOLVED + R_EXACT_EXPECTED_TYPE + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + requestor.getResults()); +} + + } #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/parser/NameReferenceCompletionTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/NameReferenceCompletionTest.java,v retrieving revision 1.16 diff -u -r1.16 NameReferenceCompletionTest.java --- src/org/eclipse/jdt/core/tests/compiler/parser/NameReferenceCompletionTest.java 27 Jun 2008 16:04:46 -0000 1.16 +++ src/org/eclipse/jdt/core/tests/compiler/parser/NameReferenceCompletionTest.java 1 Apr 2009 12:20:58 -0000 @@ -162,7 +162,8 @@ " }\n" + " void foo() {\n" + " Enumeration e;\n" + - " ;\n" + + " for (; ; ) \n" + + " ;\n" + " }\n" + "}\n", // expectedCompletionIdentifier: Index: src/org/eclipse/jdt/core/tests/compiler/parser/FieldAccessCompletionTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/FieldAccessCompletionTest.java,v retrieving revision 1.21 diff -u -r1.21 FieldAccessCompletionTest.java --- src/org/eclipse/jdt/core/tests/compiler/parser/FieldAccessCompletionTest.java 27 Jun 2008 16:04:46 -0000 1.21 +++ src/org/eclipse/jdt/core/tests/compiler/parser/FieldAccessCompletionTest.java 1 Apr 2009 12:20:57 -0000 @@ -1118,7 +1118,8 @@ " }\n" + " void foo() {\n" + " int i;\n" + - " ;\n" + + " for (; ; ) \n" + + " ;\n" + " }\n" + "}\n", // expectedCompletionIdentifier: