Bug 41906 [typing] Code assists handles anonymous inner classes less than optimal
Type the following code and press return at the indicated cursor position. addActionListener(new ActionListener() { <<<cursor_position>>> ) You get the following code: addActionListener(new ActionListener() { ) } The normal brace and the curly brace should really be exchanged.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
private String getBlockIndent(IDocument d, DocumentCommand c) {
		if (c.offset < 0 || d.getLength() == 0)
			return null;
		try {
			int p= (c.offset == d.getLength() ? c.offset - 1 : c.offset);
			int line= d.getLineOfOffset(p);
			
			int indLine= findMatchingOpenBracket(d, line, c.offset, 1);
			if (indLine != -1)
				
				return getIndentOfLine(d, indLine);
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
		return null;
	}
	private String createIndent(int level, boolean useSpaces) {
		StringBuffer buffer= new StringBuffer();
		if (useSpaces) {
            
			int width= level * getTabWidth();
			for (int i= 0; i != width; ++i)
				buffer.append(' ');
		} else {
			for (int i= 0; i != level; ++i)
				buffer.append('\t');
		}
		return buffer.toString();
	}