return TextUtilities.getIndent(buf.getText(i, offset - i), tabWidth);
	public static int getIndentUsed(IJavaElement elem) throws JavaModelException {		if (elem instanceof ISourceReference) {			int tabWidth= CodeFormatterPreferencePage.getTabSize();			ICompilationUnit cu= (ICompilationUnit)JavaModelUtil.findElementOfKind(elem, IJavaElement.COMPILATION_UNIT);			if (cu != null) {				IBuffer buf= cu.getBuffer();				int i= ((ISourceReference)elem).getSourceRange().getOffset();				int result= 0;				int blanks= 0;							while (i > 0) {					i--;					char ch= buf.getChar(i);					switch (ch) {						case '\t':							result++;							blanks= 0;							break;						case ' ':							blanks++;							if (blanks == tabWidth) {								result++;								blanks= 0;							}							break;						default:							return result;					}				}			}		}		return 0;	}