30 May 2014 17:55:01 Dusan Rodina - softwareideas.net

Add Comment

Mark Levesque 30 May 2014 17:55:01

code generation

Hi,

Just started playing with the app. Looks good so far. I was wondering if you could make it so when code is generated, any existing code within a member function in the target file would be incorporated in the new generated file.

E.g., If I had edited a file with:

public void incrementCount()

{

count++;

}

the next time I generated from the model the statements in the function would be preserved.

Also, any way to specify comments in the model that will get carried over to the code? I was only able to do something like this:

int /* test comment */ count;

Thanks.

Dusan Rodina - softwareideas.net 2 June 2014 9:45:22

RE: code generation

Hi,

Thank you very much!

You can specify comments for classes, fields and methods. You can specify comments for generated source code using documentation box.

If you want to set documentation for class: Right-click on class, choose Properties from context menu, switch to Documentation tab and type the documentation text for the field represented by this attribute.

If you want to set documentation for field: Right-click on class, choose Properties from context menu, switch to Attributes tab, select an attribute, click on Edit, switch to Documentation tab and type the documentation text.

If you want to set documentation for method: Right-click on class, choose Properties from context menu, switch to Operations tab, select an operation, click on Edit, switch to Documentation tab and type the documentation text for the method represented by this operation.

You can define also source code which will be included to methods in generated source code: right-click on class, choose Properties from context menu, switch to Operations tab, select an operation, click on Edit, switch to Body tab, choose programming language from Language drop down and set the source code for the body of the method.

It is not yet possible to preserve source code of methods in a target file.