protected ITreeAppendable appendLeftOperand(final XAbstractFeatureCall expr, ITreeAppendable appendable, boolean isExpressionContext) { XBinaryOperation binaryOperation = (XBinaryOperation) expr; XAbstractFeatureCall leftOperand = (XAbstractFeatureCall) binaryOperation.getLeftOperand(); JvmIdentifiableElement feature = leftOperand.getFeature(); if (appendable.hasName(feature)) { return appendable.append(appendable.getName(feature)); } boolean hasReceiver = appendReceiver(leftOperand, appendable, isExpressionContext); if (hasReceiver) { appendable.append("."); } return appendable.append(feature.getSimpleName()); }
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); } }
protected void assignmentToJavaExpression(XAssignment expr, ITreeAppendable b, boolean isExpressionContext) { final JvmIdentifiableElement feature = expr.getFeature(); if (feature instanceof JvmOperation) { boolean appendReceiver = appendReceiver(expr, b, isExpressionContext); if (appendReceiver) b.append("."); boolean appendReceiver = appendReceiver(expr, b, isExpressionContext); if (appendReceiver) b.append(".");