statecharts icon indicating copy to clipboard operation
statecharts copied to clipboard

Code generators should support generation of model comments.

Open nyssen opened this issue 8 years ago • 2 comments

The code generators should transfer model comments into code. Especially those comments that are added to transitions, entry and exit actions, states, interfaces, and regions should be reflected in the source code.

nyssen avatar Nov 25 '15 08:11 nyssen

First it has to be defined where the comments and the documentation should go.

terfloth avatar Feb 22 '16 10:02 terfloth

There are already generated comments in the generated code, for example;

/* Entry action for state 'State_B'. */
static void testing_enact_main_region_State_B(Testing* handle)
{
    /* Entry action for state 'State_B'. */
    handle->ifaceUser.currentState = 2;
}

In my example state model (see below) I have put comments in both states. yakindu comments Could the example code generated become;

/* Entry action for state 'State_B'. */
static void testing_enact_main_region_State_B(Testing* handle)
{
    /* Entry action for state 'State_B'. */
    handle->ifaceUser.currentState = 2; /* set state A=2 */
}

robfox1976 avatar Nov 10 '16 12:11 robfox1976