Bug 108312 [typing] Smart semicolong option should support anonymizing a class
1) Place the caret between the closing parenthesis ')' and semicolon ';'. 2) Type an open brace '{'. 3) Type Enter key (carriage return). See that closing brace '}' is automatically added, but semicolon ';' is illegally misplaced. ----------------- Bug.java ------------------------ class Bug { Object object=new Object(); }
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);