Bug 63688 wrong indent after 'enter'
3.0 m9 quite annoing usability problem: create this: public int getFoo(){<CARET_HERE>} press Enter you get public int getFoo(){ } which is _never_ right. i get annoyed by this every 5 minutes or so. the same bug in: if(condition){<CARET_HERE>} press Enter, you get if(condition){ } which, againi, is never what you want
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
IProblem[] problems= compilationUnit.getProblems();
		for (int i= 0; i != problems.length; ++i) {
			if (problems[i].getID() == IProblem.UnmatchedBracket)
				return true;
		}
		
		final int relativeOffset= offset - info.delta;
		
		ASTNode node= NodeFinder.perform(compilationUnit, relativeOffset, length);
		if (node == null)
			return false;
		if (length == 0) {
			while (node != null && (relativeOffset == node.getStartPosition() || relativeOffset == node.getStartPosition() + node.getLength()))
				node= node.getParent();
		}
		
		switch (node.getNodeType()) {
		case ASTNode.BLOCK:
			return getBlockBalance(document, offset, fPartitioning) <= 0;
		case ASTNode.IF_STATEMENT: 
			{
				IfStatement ifStatement= (IfStatement) node;
				Expression expression= ifStatement.getExpression();
				IRegion expressionRegion= createRegion(expression, info.delta);
				Statement thenStatement= ifStatement.getThenStatement();
				IRegion thenRegion= createRegion(thenStatement, info.delta);
				
				if (expressionRegion.getOffset() + expressionRegion.getLength() <= offset && offset + length <= thenRegion.getOffset())
					return thenStatement != null;