buf.append(';');
if (document.getChar(offset) != ')') buf.append(';');
	protected boolean updateReplacementString(IDocument document, char trigger, int offset, ImportsStructure impStructure) throws CoreException, BadLocationException {		String replacementString= getReplacementString();		// construct replacement text: an expression to be formatted		StringBuffer buf= new StringBuffer("new A("); //$NON-NLS-1$		buf.append(replacementString);		if (!replacementString.endsWith(")")) { //$NON-NLS-1$			buf.append(')');		}		if (!createStubs(buf, impStructure)) {			return false;		}		buf.append(';');		// use the code formatter		String lineDelim= StubUtility.getLineDelimiterFor(document);		int tabWidth= CodeFormatterUtil.getTabWidth(fCompilationUnit.getJavaProject());		IRegion region= document.getLineInformationOfOffset(getReplacementOffset());		int indent= Strings.computeIndent(document.get(region.getOffset(), region.getLength()), tabWidth);		String replacement= CodeFormatterUtil.format(CodeFormatter.K_EXPRESSION, buf.toString(), 0, null, lineDelim, fDeclaringType.getJavaProject());		replacement= Strings.changeIndent(replacement, 0, tabWidth, CodeFormatterUtil.createIndentString(indent, fCompilationUnit.getJavaProject()), lineDelim);		int start= replacement.indexOf('(') + 1;		int end= replacement.lastIndexOf(';') + 1;		setReplacementString(replacement.substring(start, end));		int pos= offset;		while (pos < document.getLength() && Character.isWhitespace(document.getChar(pos))) {			pos++;		}		if (pos < document.getLength() && document.getChar(pos) == ')') {			setReplacementLength(pos - offset + 1);		}		return true;	}