private String computeGuessingCompletion(){
  StringBuffer buffer=new StringBuffer();
  appendMethodNameReplacement(buffer);
  FormatterPrefs prefs=getFormatterPrefs();
  setCursorPosition(buffer.length());
  if (prefs.afterOpeningParen)   buffer.append(SPACE);
  char[][] parameterNames=fProposal.findParameterNames();
  fChoices=guessParameters(parameterNames);
  int count=fChoices.length;
  int replacementOffset=getReplacementOffset();
  for (int i=0; i < count; i++) {
    if (i != 0) {
      if (prefs.beforeComma)       buffer.append(SPACE);
      buffer.append(COMMA);
      if (prefs.afterComma)       buffer.append(SPACE);
    }
    buffer.append(parameterNames[i]);
  }
  if (prefs.beforeClosingParen)   buffer.append(SPACE);
  buffer.append(RPAREN);
  return buffer.toString();
}

private String computeGuessingCompletion ( ) { StringBuffer buffer = new StringBuffer ( ) ; appendMethodNameReplacement ( buffer ) ; FormatterPrefs prefs = getFormatterPrefs ( ) ; setCursorPosition ( buffer . length ( ) ) ; if ( prefs . afterOpeningParen ) buffer . append ( SPACE ) ; char [ ] [ ] parameterNames = fProposal . findParameterNames ( ) ; fChoices = guessParameters ( parameterNames ) ; int count = fChoices . length ; int replacementOffset = getReplacementOffset ( ) ; for ( int i = 0 ; i < count ; i ++ ) { if ( i != 0 ) { if ( prefs . beforeComma ) buffer . append ( SPACE ) ; buffer . append ( COMMA ) ; if ( prefs . afterComma ) buffer . append ( SPACE ) ; } buffer . append ( parameterNames [ i ] ) ; } if ( prefs . beforeClosingParen ) buffer . append ( SPACE ) ; buffer . append ( RPAREN ) ; return buffer . toString ( ) ; }
creates the completion string . offsets and lengths are set to the offsets and lengths of the parameters .
