buf.append(getDisplayString());
buf.append(expected);
	public boolean validate(IDocument document, int offset, DocumentEvent event) {		if (offset < getReplacementOffset())			return false;		String expected;		if (fProposal.getKind() == CompletionProposal.METHOD_NAME_REFERENCE) {			// static imports - includes package & type name			StringBuffer buf= new StringBuffer();			buf.append(Signature.toCharArray(fProposal.getDeclarationSignature()));			buf.append('.');			buf.append(getDisplayString()); // TODO remove early display string reference			expected= buf.toString();		} else {			/*			 * See http://dev.eclipse.org/bugs/show_bug.cgi?id=17667			String word= fReplacementString;			 */			expected= getDisplayString(); // TODO remove early display string reference		}		boolean validated= startsWith(document, offset, expected);		if (validated && event != null) {			// adapt replacement range to document change			int delta= (event.fText == null ? 0 : event.fText.length()) - event.fLength;			final int newLength= Math.max(getReplacementLength() + delta, 0);			setReplacementLength(newLength);		}		return validated;	}