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
* Computes an insert position for an opening brace if <code>offset</code> maps to a position in
	 * <code>document</code> that looks like being the RHS of an assignment or like an array definition.
	 *
	 * @param document the document being modified
	 * @param line the current line under investigation
	 * @param offset the offset of the caret position, relative to the line start.
	 * @param partitioning the document partitioning
	 * @return an insert position  relative to the line start if <code>line</code> looks like being an array initialization at <code>offset</code>, -1 otherwise
	 */
	private static int computeArrayInitializationPos(IDocument document, ITextSelection line, int offset, String partitioning) {
		
		int pos= offset + line.getOffset();
		if (pos == 0)
			return -1;
		int p= firstNonWhitespaceBackward(document, pos - 1, partitioning, -1);
		if (p == -1)
			return -1;
		try {
			char ch= document.getChar(p);
			if (ch != '=' && ch != ']')
				return -1;
			if (p == 0)
				return offset;
			p= firstNonWhitespaceBackward(document, p - 1, partitioning, -1);
			if (p == -1)
				return -1;
			ch= document.getChar(p);
			if (Character.isJavaIdentifierPart(ch) || ch == ']' || ch == '[')
				return offset;
		} catch (BadLocationException e) {