Search in sources :

Example 1 with ParameterTypes

use of org.yakindu.sct.model.sgen.ParameterTypes in project statecharts by Yakindu.

the class SGenJavaValidator method checkParameterValueType.

@Check
public void checkParameterValueType(final FeatureParameterValue parameterValue) {
    if (parameterValue == null || parameterValue.getExpression() == null)
        return;
    InferenceResult valueResult = inferrer.infer(parameterValue.getExpression());
    ParameterTypes parameterType = parameterValue.getParameter().getParameterType();
    typeValidator.assertAssignable(InferenceResult.from(mapType(parameterType)), valueResult, null, this);
}
Also used : InferenceResult(org.yakindu.base.types.inferrer.ITypeSystemInferrer.InferenceResult) ParameterTypes(org.yakindu.sct.model.sgen.ParameterTypes) Check(org.eclipse.xtext.validation.Check)

Example 2 with ParameterTypes

use of org.yakindu.sct.model.sgen.ParameterTypes in project statecharts by Yakindu.

the class FeatureParameterImpl method setParameterType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setParameterType(ParameterTypes newParameterType) {
    ParameterTypes oldParameterType = parameterType;
    parameterType = newParameterType == null ? PARAMETER_TYPE_EDEFAULT : newParameterType;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SGenPackage.FEATURE_PARAMETER__PARAMETER_TYPE, oldParameterType, parameterType));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) ParameterTypes(org.yakindu.sct.model.sgen.ParameterTypes)

Aggregations

ParameterTypes (org.yakindu.sct.model.sgen.ParameterTypes)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Check (org.eclipse.xtext.validation.Check)1 InferenceResult (org.yakindu.base.types.inferrer.ITypeSystemInferrer.InferenceResult)1