public CompletionProposal withSuffix(String suffix, String explanation) { return new CompletionProposal(start + suffix, explanation); }
/** * Add a suffix as a new token, that is, make sure there is a space before it. * <p> * A space is not appended if this is the very first token. * * @param suffix the suffix to add * @param explanation the explanation of how to complete the text * @return the new instance of a completion proposal */ public CompletionProposal withSeparateTokens(String suffix, String explanation) { return new CompletionProposal( (start.endsWith(" ") || start.isEmpty()) ? start + suffix : start + " " + suffix, explanation); }