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.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java
* @param ch the character to be inserted
	 * @return <code>true</code> if <code>ch</code> is already present at <code>location</code>, <code>false</code> otherwise
	 */
	private boolean alreadyPresent(IDocument document, char ch, int position) {
		int pos= firstNonWhitespaceForward(document, position, fPartitioning, document.getLength());
		try {
			if (pos != -1 && document.getChar(pos) == ch)
				return true;
		} catch (BadLocationException e) {
		}
		return false;
	}
	/**
	 * Computes the next insert position of the given character in the current line.
	 *
	 * @param document the document we are working on
	 * @param line the line where the change is being made
	 * @param offset the position of the caret in the line when <code>character</code> was typed
	 * @param character the character to look for
	 * @param partitioning the document partitioning
	 * @return the position where <code>character</code> should be inserted / replaced
	 */
	protected static int computeCharacterPosition(IDocument document, ITextSelection line, int offset, char character, String partitioning) {
		String text= line.getText();
		if (text == null)
			return 0;
		int insertPos;
		if (character == BRACECHAR) {
			insertPos= computeArrayInitializationPos(document, line, offset, partitioning);
			if (insertPos == -1) {