Bug 50194 Indenting Java breaks comments
When correcting indentation (ctrl-I in my configuration), java comments are not properly preserved. My original code [1] is 'indented' to code [2], which is unexpected and syntactically incorrect. thanks PhF .. [1] try{ /* for(int i=0; i<8; i++){ System.out.println("something");} */ somethingElse(); .. [2] try{ /* */ for(int i=0; i<8; i++){ System.out.println("something");} */ somethingElse();
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
}
	private static int getMargin() {
		return getPreferenceStore().getInt(ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN);
	}
	private static final String[] fgInlineTags= {
		"<b>", "<i>", "<em>", "<strong>", "<code>"  
	};
	
	private boolean isInlineTag(String string) {
		for (int i= 0; i < fgInlineTags.length; i++)
			if (string.startsWith(fgInlineTags[i]))
				return true;	
		return false;
	}
	
	/**
	 * returns true if the specified line is part of a paragraph and should be merged with
	 * the previous line.
	 */
	private boolean isJavaDocLine(IDocument document, int line) throws BadLocationException {
		if (document.getNumberOfLines() < line)
			return false;
		int offset= document.getLineOffset(line);
		int length= document.getLineLength(line);
		int firstChar= findEndOfWhiteSpace(document, offset, offset + length);
		length -= firstChar - offset;
		String lineContents= document.get(firstChar, length);
		String prefix= lineContents.trim();		
		if (!prefix.startsWith("*") || prefix.startsWith("*/")) 
			return false;