Bug 97921 [typing] CompilationUnitEditor.TabConvertor should use project dependent formatter settings
with 3.1 RC1, In the code formatter I set tab policy to spaces only, indentation size = 2, and tab size = 8. when I hit the tab key, 2 spaces are added to the line instead of going to an 8 space (tab) boundary.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
private IJavaElement fElement;
		
		private int fElementLine;
		/**
		 * Store visual properties of the given offset.
		 *
		 * @param offset Offset in the document
		 */
		public void setOffset(int offset) {
			try {
				IDocument document= getSourceViewer().getDocument();
				fLine= document.getLineOfOffset(offset);
				fColumn= offset - document.getLineOffset(fLine);
				fElement= getElementAt(offset, true);
				fElementLine= -1;
				if (fElement instanceof IMember) {
					ISourceRange range= ((IMember) fElement).getNameRange();
					if (range != null)
						fElementLine= document.getLineOfOffset(range.getOffset());
				}
				if (fElementLine == -1)
					fElementLine= document.getLineOfOffset(getOffset(fElement));
			} catch (BadLocationException e) {
				
				JavaPlugin.log(e);
				clear();
			} catch (JavaModelException e) {
				
				JavaPlugin.log(e.getStatus());
				clear();