Bug 107128 [typing] Move lines destroys indentation of outcommented code
I20050811-1530 Move lines destroys the indentation of code that has been commented out. IMO, Move lines should never try to be smart about the contents of a commented section. It should just add/remove whitespace in front of the // (same behavior as when moving other statements). public class Klass { int bar; // void foo() { // System.out.println("foo"); // } } - select the 3 commented lines - press Alt+Up -> document looks like this (note the removed tab in fromt of System.out.pr...): public class Klass { // void foo() { // System.out.println("foo"); // } int bar; }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java
return result;
	}
	
	/**
	 * Shifts the line range specified by <code>lines</code> in
	 * <code>document</code>. The amount that the lines get shifted
	 * are determined by the first line in the range, all subsequent
	 * lines are adjusted accordingly. The passed Java project may be
	 * <code>null</code>, it is used solely to obtain formatter
	 * preferences.
	 * 
	 * @param document the document to be changed
	 * @param lines the line range to be shifted
	 * @param project the Java project to get the formatter preferences
	 *        from, or <code>null</code> if global preferences should
	 *        be used
	 * @param result the result from a previous call to
	 *        <code>shiftLines</code>, in order to maintain comment
	 *        line properties, or <code>null</code>. Note that the
	 *        passed result may be changed by the call.
	 * @return an indent result that may be queried for changes and can
	 *         be reused in subsequent indentation operations
	 * @throws BadLocationException if <code>lines</code> is not a
	 *         valid line range on <code>document</code>
	 */
	public static IndentResult shiftLines(IDocument document, ILineRange lines, IJavaProject project, IndentResult result) throws BadLocationException {
		int numberOfLines= lines.getNumberOfLines();
		
		if (numberOfLines < 1)