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
* Checks whether <code>position</code> resides in a default (Java) partition of <code>document</code>.
	 * 
	 * @param document the document being modified
	 * @param position the position to be checked
	 * @param partitioning the document partitioning
	 * @return <code>true</code> if <code>position</code> is in the default partition of <code>document</code>, <code>false</code> otherwise
	 */
	private static boolean isDefaultPartition(IDocument document, int position, String partitioning) {
		Assert.isTrue(position >= 0);
		Assert.isTrue(position <= document.getLength());
		
		try {
			ITypedRegion region= TextUtilities.getPartition(document, partitioning, position);
			return region.getType().equals(IDocument.DEFAULT_CONTENT_TYPE);
			
		} catch (BadLocationException e) {
		}
		
		return false;
	}
	/**
	 * Finds the position of the parenthesis matching the closing parenthesis at <code>position</code>.
	 * 
	 * @param document the document being modified
	 * @param position the position in <code>document</code> of a closing parenthesis
	 * @param partitioning the document partitioning
	 * @return the position in <code>document</code> of the matching parenthesis, or -1 if none can be found
	 */
	private static int findOpeningParenMatch(IDocument document, int position, String partitioning) {
		final char CLOSING_PAREN= ')';