Bug 113159 CUEditor won't let me insert just one TAB
Given the following code: Pattern pattern = selected ? new Pattern(null,...) : new Pattern(nul,...); <<CARET>>g.setBackgroundPattern(pattern); I cannot insert a single TAB at the Caret location. typing TAB inserts two TABs. BACKSPACE deletes both.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java
IDocumentProvider provider= editor.getDocumentProvider();
			IEditorInput input= editor.getEditorInput();
			if (provider != null && input != null)
				return provider.getDocument(input);
			
		}
		return null;
	}
	
	/**
	 * Returns the selection on the editor or an invalid selection if none can be obtained. Returns
	 * never <code>null</code>.
	 * 
	 * @return the current selection, never <code>null</code>
	 */
	private ITextSelection getSelection() {
		ISelectionProvider provider= getSelectionProvider();
		if (provider != null) {
			
			ISelection selection= provider.getSelection();
			if (selection instanceof ITextSelection)
				return (ITextSelection) selection;
		}
		
		
		return TextSelection.emptySelection();
	}
	
}