use of org.yakindu.sct.model.sruntime.impl.ExecutionContextImpl in project statecharts by Yakindu.
the class FeatureParameterValueImpl method getExecutionContext.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
protected ExecutionContext getExecutionContext() {
if (!(EcoreUtil.getRootContainer(this) instanceof GeneratorModel)) {
return new ExecutionContextImpl();
}
ExecutionContext context = new ExecutionContextImpl();
GeneratorModel generatorModel = (GeneratorModel) EcoreUtil.getRootContainer(this);
EList<PropertyDefinition> properties = generatorModel.getProperties();
for (PropertyDefinition propertyDefinition : properties) {
ExecutionVariable variable = SRuntimeFactory.eINSTANCE.createExecutionVariable();
variable.setName(propertyDefinition.getName());
variable.setFqName(propertyDefinition.getName());
variable.setType(propertyDefinition.getType());
variable.setValue(interpreter.evaluate(propertyDefinition.getInitialValue(), context));
context.getSlots().add(variable);
}
return context;
}
Aggregations