void (InsertionContext context, int startOffset, LookupElement item) { Editor editor = context.getEditor(); Object o = item.getObject(); assert o instanceof PsiMethod; PsiMethod method = (PsiMethod) o; StringBuffer buffer = new StringBuffer(); buffer.append("("); PsiParameterList params = method.getParameterList(); int count = params.getParametersCount(); int i = 0; for (PsiParameter parameter : params.getParameters()) { PsiType type = parameter.getType(); String text = type.getCanonicalText(); if (type instanceof PsiEllipsisType) { text = text.substring(0, text.length() - 3) + "[]"; } buffer.append(PsiTypesUtil.unboxIfPossible(text)); if (i < count - 1) { buffer.append(", "); } i++; } buffer.append(") "); CaretModel caretModel = editor.getCaretModel(); int endOffset = shortenParamterReferences(context, startOffset, method, buffer); caretModel.moveToOffset(endOffset); }