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
verifySemicolonPosition(13, -1);
	}
	
	public void testWithExistingBefore() throws BadLocationException {
		fDocument.set("public void; foobar()");
		verifySemicolonPosition(12, 21);
	}
	
	public void testWithExistingBeforeWithComment() throws BadLocationException {
		fDocument.set("public void; foobar() // comment\r\n ");
		verifySemicolonPosition(12, 21);
	}
	
	public void testWithExistingAtInsertPosition() throws BadLocationException {
		if (true) {
			System.out.println("testWithExistingAtInsertPosition disabled - existing characters handled by framework");
			return;
		}
		fDocument.set("public void foobar(); // comment\r\n");
		verifySemicolonPosition(12, 12);
	}
	public void testEndLineComment() throws BadLocationException {
		fDocument.set("private string foo= \"foobar\" // comment\r\n");
		verifySemicolonPosition(12, 28);
	}
	public void testFakeEndLineComment() throws BadLocationException {
		fDocument.set("private string foo= \"foobar\" /* comment */   \r\n");
		verifySemicolonPosition(12, 28);
	}