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
return true;
		} catch (BadLocationException e) {
		}
		return false;
	}
	/**
	 * Checks whether the content of <code>document</code> at <code>position</code> looks like an
	 * anonymous class definition. <code>position</code> must be to the left of the opening
	 * parenthesis of the definition's parameter list.
	 * 
	 * @param document the document being modified
	 * @param position the first character position in <code>document</code> to be considered
	 * @param partitioning the document partitioning
	 * @return <code>true</code> if the content of <code>document</code> looks like an anonymous class definition, <code>false</code> otherwise
	 */
	private static boolean looksLikeAnonymousClassDef(IDocument document, String partitioning, JavaHeuristicScanner scanner, int position) {
		int previousCommaOrParen= scanner.scanBackward(position - 1, JavaHeuristicScanner.UNBOUND, new char[] {',', '('});
		if (previousCommaOrParen == -1 || position < previousCommaOrParen + 5) 
			return false;
		if (isNewMatch(document, previousCommaOrParen + 1, position - previousCommaOrParen - 2, partitioning))
			return true;
		return false;
	}
	/**
	 * 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