use of org.eclipse.titan.designer.AST.TTCN3.statements.LogArguments in project titan.EclipsePlug-ins by eclipse.
the class VerdictWithoutReason method process.
@Override
public void process(final IVisitableNode node, final Problems problems) {
if (!(node instanceof Setverdict_Statement)) {
return;
}
final Setverdict_Statement s = (Setverdict_Statement) node;
final Value verdictValue = s.getVerdictValue();
if (verdictValue == null) {
return;
}
final CompilationTimeStamp ct = CompilationTimeStamp.getBaseTimestamp();
final Type_type temp = verdictValue.getExpressionReturntype(ct, Expected_Value_type.EXPECTED_TEMPLATE);
if (Type_type.TYPE_VERDICT != temp) {
return;
}
final LogArguments verdictReason = s.getVerdictReason();
if (Value_type.VERDICT_VALUE.equals(verdictValue.getValuetype()) && !Verdict_type.PASS.equals(((Verdict_Value) verdictValue).getValue()) && verdictReason == null) {
final String msg = MessageFormat.format(WITHOUT_REASON, ((Verdict_Value) verdictValue).getValue());
problems.report(s.getLocation(), msg);
}
}
Aggregations