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
insertPos= computeAfterTryDoElse(document, line, offset);
			}
			if (insertPos == -1) {
				insertPos= computeAfterParenthesis(document, line, offset, partitioning);
			}
		} else if (character == SEMICHAR) {
			if (isForStatement(text, offset)) {
				insertPos= -1; 
			} else {
				int nextPartitionPos= nextPartitionOrLineEnd(document, line, offset, partitioning);
				insertPos= startOfWhitespaceBeforeOffset(text, nextPartitionPos);
				
				if (insertPos > 0 && text.charAt(insertPos - 1) == character)
					insertPos= insertPos - 1;
				else if (insertPos > 0 && text.charAt(insertPos - 1) == '}') {
					int opening= scanBackward(document, insertPos - 1 + line.getOffset(), partitioning, -1, new char[] { '{' });
					if (opening > -1 && opening < offset + line.getOffset()) {
						if (computeArrayInitializationPos(document, line, opening - line.getOffset(), partitioning) == -1) {
							insertPos= offset;
						}
					}
				}
			}
		} else {
			Assert.isTrue(false);
			return -1;
		}
		return insertPos;
	}
	/**