StarUML in generating C++ code

6.2k views Asked by At

I'm new to UML and I have written a Sequence diagram for a Voucher User Interface, it is a small pet project I'm doing to learn UML. I have written a decent Sequence Diagram in StarUML and now I would like to generate the C++ code, the step is very simple I just go to Tools/C++/Generate Code... But there I face a problem, which you can understand from the screen captures below. I tried various places but I could not find any help, anyone experienced in StarUML who could help me go further?

Step 1 Why is it Empty?

2

There are 2 answers

0
sfinnie On

Haven't used starUML for a while so things may have changed. But:

Last time I looked, it didn't provide templates for behavioural code generation. The only codegen templates were for static structure (classes, attributes, packages). If that's still the case then I suspect the empty panel arises from it not finding any suitable model elements to generate code for. i.e. your Sequence Diagram package doesn't have any classes in it.

You might be able to work it out by looking at the codegen templates; they should be in

<STARUML_INSTALL_PATH>\modules\staruml-generator\templates

hth.

0
AnotherDeveloper On

I just tried to generate the code from start uml. With Version 5.0.3.1570. It works well. I got the diagram instantly.

One issue, it actually did not generate the composition / aggregation stuff but, then, I did that manually.

Since its propitiatory for my organization, I cannot revel but, sequence is exactly the same as of yours.

I choose Design model & then gave file path in dialog box.