private void simpleApply(IDocument document,String string,ConfigurableCompletionProposal proposal) throws BadLocationException {
  proposal.setCursorPosition(string.length());
  document.replace(proposal.getReplacementOffset(),proposal.getReplacementLength(),string);
}

private void simpleApply ( IDocument document , String string , ConfigurableCompletionProposal proposal ) throws BadLocationException { proposal . setCursorPosition ( string . length ( ) ) ; document . replace ( proposal . getReplacementOffset ( ) , proposal . getReplacementLength ( ) , string ) ; }
just insert the string at the replacement offset . everything else is fine .
