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
int whiteEnd= findEndOfWhiteSpace(d, start, end);
			return d.get(start, whiteEnd - start);
		} else {
			return ""; 
		}
	}
	private int getStringEnd(IDocument d, int offset, int endOffset, char ch) throws BadLocationException {
		while (offset < endOffset) {
			char curr= d.getChar(offset);
			offset++;
			if (curr == '\\') {
				
				offset++;
			} else if (curr == ch) {
				return offset;
			}
		}
		return endOffset;
	}
	private void smartInsertAfterBracket(IDocument d, DocumentCommand c) {
		if (c.offset == -1 || d.getLength() == 0)
			return;
		try {
			int p= (c.offset == d.getLength() ? c.offset - 1 : c.offset);
			int line= d.getLineOfOffset(p);
			int start= d.getLineOffset(line);
			int whiteend= findEndOfWhiteSpace(d, start, c.offset);
			
			if (whiteend == c.offset) {