@Override protected ITreeAppendable appendTypeArguments(XAbstractFeatureCall call, ITreeAppendable original) { if (!call.getTypeArguments().isEmpty()) { return super.appendTypeArguments(call, original); } ILocationData completeLocationData = getLocationWithTypeArguments(call); ITreeAppendable completeFeatureCallAppendable = completeLocationData != null ? original.trace(completeLocationData) : original; IResolvedTypes resolvedTypes = batchTypeResolver.resolveTypes(call); List<LightweightTypeReference> typeArguments = resolvedTypes.getActualTypeArguments(call); if (!typeArguments.isEmpty()) { for(LightweightTypeReference typeArgument: typeArguments) { if (typeArgument.isWildcard()) { return completeFeatureCallAppendable; } } completeFeatureCallAppendable.append("<"); for (int i = 0; i < typeArguments.size(); i++) { if (i != 0) { completeFeatureCallAppendable.append(", "); } completeFeatureCallAppendable.append(typeArguments.get(i)); } completeFeatureCallAppendable.append(">"); } return completeFeatureCallAppendable; }
serialize(importedTypes.get(index - numberArguments), call, b); } else if (index == numberArguments + numberImports) { appendTypeArguments(call, b); } else { XExpression argument = arguments.get(index);
protected void featureCalltoJavaExpression(final XAbstractFeatureCall call, ITreeAppendable b, boolean isExpressionContext) { if (call instanceof XAssignment) { assignmentToJavaExpression((XAssignment) call, b, isExpressionContext); } else { if (needMultiAssignment(call)) { appendLeftOperand(call, b, isExpressionContext).append(" = "); } final JvmAnnotationReference annotationRef = this.expressionHelper.findInlineAnnotation(call); if (annotationRef == null || !isConstantExpression(annotationRef)) { boolean hasReceiver = appendReceiver(call, b, isExpressionContext); if (hasReceiver) { b.append("."); b = appendTypeArguments(call, b); } } appendFeatureCall(call, b); } }