Bug 29909 Incorrect indentation after newline
I have my preferences set as follows: Java | Editor | Displayed tab width: 8 Java | Code formatter | Insert tabs for indentation: No Java | Code formatter | Number of spaces representing an indentation level: 4 When I have the following code: class ContainerSelection extends Selection { } and I position the caret after the { and press Enter, Eclipse inserts a new line and 8 spaces. It should only insert 4.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
case '}' :
					if (!ignoreCloseBrackets) {
						bracketcount--;
					}
					break;
				case '"' :
				case '\'' :
					start= getStringEnd(d, start, end, curr);
					break;
				default :
					}
		}
		return bracketcount;
	}
	
	private int getCommentEnd(IDocument d, int pos, int end) throws BadLocationException {
		while (pos < end) {
			char curr= d.getChar(pos);
			pos++;
			if (curr == '*') {
				if (pos < end && d.getChar(pos) == '/') {
					return pos + 1;
				}
			}
		}
		return end;
	}
	protected String getIndentOfLine(IDocument d, int line) throws BadLocationException {
		if (line > -1) {
			int start= d.getLineOffset(line);