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 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 testSemicolonInEmptyMethodBody() throws BadLocationException {
		fDocument.set("void foobar(int param) {}");
		verifySemicolonPosition(24, 24);
	}
	
	
	
	public void testBraceClassDef() throws BadLocationException {
		fDocument.set("public static final class Main ");
		verifyBracePosition(31, 31);