Java code generation from UML Behavioral diagrams [message #1784400] |
Tue, 27 March 2018 12:07  |
Eclipse User |
|
|
|
Hello,
I would appreciate if you can answer me :
I have defined a class diagram with papyrus with the goal to automatically generate the Java corresponding code, for the structure it seems good and I find no problem, but i want that the objects interaction will be automatically generated from sequence diagrams, and the operations code of any class will be also generated from activity diagrams.
Is Papyrus offers this functionality?
With Best Regards.
|
|
|
|
|
Re: Java code generation from UML Behavioral diagrams [message #1785256 is a reply to message #1784467] |
Wed, 11 April 2018 11:27  |
Eclipse User |
|
|
|
Hi,
well, a UML model is an EMF model (there is an UML.ecore in the org.eclipse.uml2.uml model). So, I don't see a problem to write ATL transformations, but you would have to rewrite a Java generator from scratch. Therefore, I would recommend to look into the transformation approach in Papyrus SW designer. The idea is that the code generators support the basic structural UML entities and opaque expressions. Additional functionality, such as state-machine generation is provided by model 2 model transformations (i.e. UML to UML) that are part of a configurable/extensible transformation chain. Doing so, the existing Java code generator is reused. In this case, the required transformation would not be very different from the one we have for C++ .
Hope that helps
Ansgar
|
|
|
Powered by
FUDForum. Page generated in 0.03408 seconds