document.replace(fReplacementOffset, fReplacementLength, fReplacementString);
replace(document, fReplacementOffset, fReplacementLength, fReplacementString);
	public void apply(IDocument document, char trigger, int offset) {		try {						// patch replacement length			int delta= offset - (fReplacementOffset + fReplacementLength);			if (delta > 0)				fReplacementLength += delta;						if (trigger == (char) 0) {				document.replace(fReplacementOffset, fReplacementLength, fReplacementString);			} else {				StringBuffer buffer= new StringBuffer(fReplacementString);				// fix for PR #5533. Assumes that no eating takes place.				if ((fReplacementLength < buffer.length() && buffer.charAt(fReplacementLength) != trigger)) {					buffer.insert(fCursorPosition, trigger);					++fCursorPosition;				}								document.replace(fReplacementOffset, fReplacementLength, buffer.toString());			}						int oldLen= document.getLength();			applyImports(document);			fReplacementOffset += document.getLength() - oldLen;					} catch (BadLocationException x) {			// ignore		}		}