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 testBraceArray2() throws BadLocationException {
		fDocument.set("arr= bla, bli, blu;");
		verifyBracePosition(4, 4);
		verifyBracePosition(5, 5);
	}
	
	public void testBraceAnonymousClassDef() throws BadLocationException {
		fDocument.set("this.addListener(blu, new Listener(), bla)");
		verifyBracePosition(34, 36);
	}
	
	public void testBraceAnonymousClassDef2() throws BadLocationException {
		fDocument.set("this.addListener(blu, \"new\", Listener(), bla)");
		verifyBracePosition(41, 41);
	}
	
	public void testBraceIfAnonymousClassDef() throws BadLocationException {
		fDocument.set("  if addListener(blu, new Listener(), bla)");
		verifyBracePosition(34, 36);
		verifyBracePosition(37, 42);
	}
	public void testBraceIfAnonymousClassDef2() throws BadLocationException {
		fDocument.set("  if addListener(blu, \"new\", Listener(), bla)");
		verifyBracePosition(20, 45);
		verifyBracePosition(39, 45);
	}
	
}