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 testBraceMethodDef() throws BadLocationException {
		fDocument.set("void bla(int p1, int p2) // comment");
		verifyBracePosition(8, 24);
	}
	public void testBraceMethodDef2() throws BadLocationException {
		fDocument.set("void bla(int p1, int p2) // comment");
		verifyBracePosition(12, 24);
	}
	
	public void testBraceIf() throws BadLocationException {
		fDocument.set("if (condition && condition()) // comment");
		verifyBracePosition(12, 29);
	}
	public void testBraceIf2() throws BadLocationException {
		fDocument.set("if (value == expected) // comment");
		verifyBracePosition(12, 22);
	}
	public void testBraceMethodCall() throws BadLocationException {
		fDocument.set("call(param1, param2) // comment");
		verifyBracePosition(12, 12);
	}
	public void testBraceElse() throws BadLocationException {
		fDocument.set(" } else somecode();");
		verifyBracePosition(4, 7);
	}
	public void testBraceArray() throws BadLocationException {
		fDocument.set("int[] arr= bla, bli, blu;");
		verifyBracePosition(10, 10);
		verifyBracePosition(11, 11);