Bug 42279 unwanted indents after if()/for()/while()....
Since 3.0m3 (and one or two integration builds before it) i get an automatic indent after controll statements like if()+new line. So my code looks like this (only automatic indents): public class Main { void someMethod() { if(true) { // this doesn't look good } else if(1==1) { // this is getting even worse } // oh my god :( } } After running the code formater the code looks like expected public class Main { void someMethod() { if (true) { // this doesn't look good } else if (1 == 1) { // this is getting even worse } // oh my god :( } } If there is a switch i didn't didn't find: sorry. If not: please fix it asap
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
* @param document the document worked on
	 * @param position the insert position of the new character
	 * @param bound the lowest position to consider
	 * @return <code>true</code> if the code is a conditional statement or loop without a block, <code>false</code> otherwise
	 */
	private boolean isBracelessBlockStart(IDocument document, int position, int bound) {
		if (position < 1)
			return false;
		position= firstNonWhitespaceBackward(document, position - 1, fPartitioning, bound);
		if (position < 1)
			return false;
		
		if (looksLike(document, position, "do") 
				|| looksLike(document, position, "else")) 
			return true;
			
		try {
			
			if (")".equals(document.get(position, 1))) { 
				position= findOpeningParenMatch(document, position, fPartitioning);
				if (position > 0) {
					position= firstNonWhitespaceBackward(document, position - 1, fPartitioning, -1);
					if (position != -1) {
						if (looksLike(document, position, "if") 
								|| looksLike(document, position, "for") 
								|| looksLike(document, position, "while")) 
							return true;
					}
				}
			}