use of org.eclipse.titan.designer.AST.TTCN3.values.expressions.ExpressionStruct in project titan.EclipsePlug-ins by eclipse.
the class Catch_Statement method generateCode.
@Override
public /**
* {@inheritDoc}
*/
void generateCode(final JavaGenData aData, final StringBuilder source) {
final ExpressionStruct expression = new ExpressionStruct();
generateCodeExpression(aData, expression);
PortGenerator.generateCodeStandalone(aData, source, expression.expression.toString(), getLocation());
}
use of org.eclipse.titan.designer.AST.TTCN3.values.expressions.ExpressionStruct in project titan.EclipsePlug-ins by eclipse.
the class Check_Catch_Statement method generateCode.
@Override
public /**
* {@inheritDoc}
*/
void generateCode(final JavaGenData aData, final StringBuilder source) {
final ExpressionStruct expression = new ExpressionStruct();
generateCodeExpression(aData, expression);
PortGenerator.generateCodeStandalone(aData, source, expression.expression.toString(), getLocation());
}
use of org.eclipse.titan.designer.AST.TTCN3.values.expressions.ExpressionStruct in project titan.EclipsePlug-ins by eclipse.
the class Check_Getcall_Statement method generateCode.
@Override
public /**
* {@inheritDoc}
*/
void generateCode(final JavaGenData aData, final StringBuilder source) {
final ExpressionStruct expression = new ExpressionStruct();
generateCodeExpression(aData, expression);
PortGenerator.generateCodeStandalone(aData, source, expression.expression.toString(), getLocation());
}
use of org.eclipse.titan.designer.AST.TTCN3.values.expressions.ExpressionStruct in project titan.EclipsePlug-ins by eclipse.
the class Check_Getreply_Statement method generateCodeExpression.
@Override
public /**
* {@inheritDoc}
*/
void generateCodeExpression(final JavaGenData aData, final ExpressionStruct expression) {
if (portReference != null) {
portReference.generateCode(aData, expression);
expression.expression.append(".check_getreply(");
if (parameter != null) {
// FIXME handle redirect
parameter.generateCode(aData, expression, Restriction_type.TR_NONE);
final IType signature = parameter.getTemplateBody().getMyGovernor();
final IType signatureType = signature.getTypeRefdLast(CompilationTimeStamp.getBaseTimestamp());
final IType returnType = ((Signature_Type) signatureType).getSignatureReturnType();
if (returnType != null) {
expression.expression.append(".set_value_template(");
if (valueMatch != null) {
valueMatch.generateCode(aData, expression, Restriction_type.TR_NONE);
} else {
// the value match is not present
// we must substitute it with ? in the signature template
expression.expression.append(MessageFormat.format("new {0}(template_sel.ANY_VALUE)", returnType.getGenNameTemplate(aData, expression.expression, myScope)));
}
expression.expression.append(')');
}
expression.expression.append(", ");
generateCodeExprFromclause(aData, expression);
// FIXME handle redirections
expression.expression.append(", ");
if (redirectSender == null) {
expression.expression.append("null");
} else {
redirectSender.generateCode(aData, expression);
}
} else {
// the signature template is not present
generateCodeExprFromclause(aData, expression);
expression.expression.append(", ");
if (redirectSender == null) {
expression.expression.append("null");
} else {
redirectSender.generateCode(aData, expression);
}
}
// FIXME handle index redirection
expression.expression.append(", null");
} else {
// the operation refers to any port
expression.expression.append("TitanPort.any_check_getreply(");
generateCodeExprFromclause(aData, expression);
expression.expression.append(", ");
if (redirectSender == null) {
expression.expression.append("null");
} else {
redirectSender.generateCode(aData, expression);
}
}
expression.expression.append(')');
}
use of org.eclipse.titan.designer.AST.TTCN3.values.expressions.ExpressionStruct in project titan.EclipsePlug-ins by eclipse.
the class Check_Port_Statement method generateCode.
@Override
public /**
* {@inheritDoc}
*/
void generateCode(final JavaGenData aData, final StringBuilder source) {
final ExpressionStruct expression = new ExpressionStruct();
generateCodeExpression(aData, expression);
PortGenerator.generateCodeStandalone(aData, source, expression.expression.toString(), getLocation());
}
Aggregations