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
}
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
	}
	
	private void smartIndentAfterOpeningBracket(IDocument d, DocumentCommand c) {
		if (c.offset < 1 || d.getLength() == 0)
			return;
			
		JavaHeuristicScanner scanner= new JavaHeuristicScanner(d);
		int p= (c.offset == d.getLength() ? c.offset - 1 : c.offset);
		
		try {
			
			int line= d.getLineOfOffset(p);
			int lineOffset= d.getLineOffset(line);
			
			
			if (d.get(lineOffset, p - lineOffset).trim().length() != 0)
				return;
			
			
			int pos= scanner.findNonWhitespaceBackward(p, JavaHeuristicScanner.UNBOUND);
			if (pos == -1)
				return;
			int lastLine= d.getLineOfOffset(pos);
			
			
			if (lastLine < line) {