Bug 43489 Conflicts between "Segmented Java Editor" and "Correct Indentation"
I20030917 + plugin export for smoke test Correct Indentation (Ctrl+I) causes problems in segmented java editor (Toolbar > click "Show Source of selected element only"). - org.junit as source - open TestCase.java - enable "Show Source of selected element only" - select method "run()" in outline - set cursor to 1:1 - Ctrl+I -> whole type becomes visible in editor - select method "run()" in outline again - manually mangle indentation by insterting/deleting tabs - Ctrl+A, Ctrl+I -> whole type becomes visible in editor - Ctrl+Z (Undo) -> the undo TextEdits are applied to the wrong offset and destroy +/- arbitrary parts of my source!
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java
BusyIndicator.showWhile(display, runnable);
			} else
				runnable.run();
			
		}
	}
	
	/**
	 * Indents a single line using the java heuristic scanner. Javadoc and multiline comments are 
	 * indented as specified by the <code>JavaDocAutoIndentStrategy</code>.
	 * 
	 * @param document the document
	 * @param line the line to be indented
	 * @param caret the caret position
	 * @param indenter the java indenter
	 * @param scanner the heuristic scanner
	 * @return <code>true</code> if <code>document</code> was modified, <code>false</code> otherwise
	 * @throws BadLocationException if the document got changed concurrently 
	 */
	private boolean indentLine(IDocument document, int line, int caret, JavaIndenter indenter, JavaHeuristicScanner scanner) throws BadLocationException {
		IRegion currentLine= document.getLineInformation(line);
		int offset= currentLine.getOffset();
		
		String indent= null;
		if (offset < document.getLength()) {
			ITypedRegion partition= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, offset);
			String type= partition.getType();
			if (partition.getOffset() < offset
					&& type.equals(IJavaPartitions.JAVA_DOC)
					|| type.equals(IJavaPartitions.JAVA_MULTI_LINE_COMMENT)) {