public int getIndexFromPosition(AceEditorCursorPosition position) {
        return getIndexFromPositionImpl(position.toJsObject());
    }
Gets the given document position as a zero-based index.

@param position the position to obtain the absolute index of (base zero)
@return An index to the current location in the document
stroom-core-client-widget/src/main/java/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java