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
int to= from;
		while (to < endOffset - 2 && document.get(to, 2).equals(LINE_COMMENT))
			to += 2;
		
		while (to < endOffset) {
			char ch= document.getChar(to);
			if (!Character.isWhitespace(ch))
				break;
			to++;
		}
		
		
		if (to > from && to < endOffset - 1 && document.get(to - 1, 2).equals(" *")) { 
			String type= TextUtilities.getContentType(document, IJavaPartitions.JAVA_PARTITIONING, to, true);
			if (type.equals(IJavaPartitions.JAVA_DOC) || type.equals(IJavaPartitions.JAVA_MULTI_LINE_COMMENT))
				to--;
		}
		
		return document.get(from, to - from);
	}
	/**
	 * Computes the difference of two indentations and returns the difference in
	 * length of current and correct. If the return value is positive, <code>addition</code>
	 * is initialized with a substring of that length of <code>correct</code>.
	 * 
	 * @param correct the correct indentation
	 * @param current the current indentation (migth contain non-whitespace)
	 * @param difference a string buffer - if the return value is positive, it will be cleared and set to the substring of <code>current</code> of that length