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
* @param indent the string to be measured.
	 * @return
	 */
	private int whiteSpaceLength(String indent) {
		if (indent == null)
			return 0;
		else {
			int size= 0;
			int l= indent.length();
			int tabSize= JavaPlugin.getDefault().getPreferenceStore().getInt(PreferenceConstants.EDITOR_TAB_WIDTH);
			
			for (int i= 0; i < l; i++)
				size += indent.charAt(i) == '\t' ? tabSize : 1;
			return size;
		}
	}
	/**
	 * Returns a tab equivalent, either as a tab character or as spaces, depending on the editor and
	 * formatter preferences.
	 * 
	 * @return a string representing one tab in the editor, never <code>null</code>
	 */
	private String getTabEquivalent() {
		String tab;
		if (JavaPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SPACES_FOR_TABS)) {
			int size= JavaCore.getPlugin().getPluginPreferences().getInt(JavaCore.FORMATTER_TAB_SIZE);
			StringBuffer buf= new StringBuffer();
			for (int i= 0; i< size; i++)
				buf.append(' ');
			tab= buf.toString();