Bug 40038 [typing] Smart semicolon fooled by method braces
Build: I20030710 Start writing a setter method, like this: public void setValue(int i) {} Then position cursor between the braces and fill in the method body. You end up with this: public void setValue(int i) {this.value=i}; Problem: when you type the semicolon, it jumps over the closing method body brace and places it at the end of the line, resulting in a syntax error.
org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/SmartSemicolonAutoEditStrategyTest.java
public void testFakeEndLineComment() throws BadLocationException {
		fDocument.set("private string foo= \"foobar\" /* comment */   \r\n");
		verifySemicolonPosition(12, 28);
	}
	
	public void testBlockComment() throws BadLocationException {
		fDocument.set("doStuff(arg1 /* comment */, args)  ");
		verifySemicolonPosition(5, 33);
	}
	public void testMultiLineComment() throws BadLocationException {
		fDocument.set("private string foo= \"foobar\" /* comment1 \r\n comment2 */");
		verifySemicolonPosition(12, 28);
	}
	public void testEndLineCommentWithFor() throws BadLocationException {
		fDocument.set("for (int i= 0; i < 2; i++) // comment");
		verifySemicolonPosition(13, -1);
	}
	public void testFakeEndLineCommentWithFor() throws BadLocationException {
		fDocument.set("for (int i= 0; i < 2; i++) /* comment */  ");
		verifySemicolonPosition(13, -1);
	}
	public void testMultiLineCommentWithFor() throws BadLocationException {
		fDocument.set("for (int i= 0; i < 2; i++) /* comment\r\n comment2 */  ");
		verifySemicolonPosition(13, -1);
	}
	
	
	public void testBraceClassDef() throws BadLocationException {
		fDocument.set("public static final class Main ");
		verifyBracePosition(31, 31);