static int measureIndentationUnits(IDocument document,int lineOfInvocationOffset,int lineOffset,IJavaProject project) throws BadLocationException {
  Map<?,?> options=project.getOptions(true);
  String lineText=document.get(lineOffset,document.getLineLength(lineOfInvocationOffset));
  int indentationUnits=IndentManipulation.measureIndentUnits(lineText,IndentManipulation.getTabWidth(options),IndentManipulation.getIndentWidth(options));
  return indentationUnits;
}

static int measureIndentationUnits ( IDocument document , int lineOfInvocationOffset , int lineOffset , IJavaProject project ) throws BadLocationException { Map < ? , ? > options = project . getOptions ( true ) ; String lineText = document . get ( lineOffset , document . getLineLength ( lineOfInvocationOffset ) ) ; int indentationUnits = IndentManipulation . measureIndentUnits ( lineText , IndentManipulation . getTabWidth ( options ) , IndentManipulation . getIndentWidth ( options ) ) ; return indentationUnits ; }
returns the indentation units for a given project , document , line and line offset .
