Skip to main content



      Home
Home » Modeling » Papyrus » Java code generation from UML Behavioral diagrams(Can we generate java code form activity and sequence diagrams with papyrus?)
Java code generation from UML Behavioral diagrams [message #1784400] Tue, 27 March 2018 12:07 Go to next message
Eclipse UserFriend
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 #1784458 is a reply to message #1784400] Wed, 28 March 2018 04:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Papyrus SW designer does not offer Java code generation for behavior diagrams. It offers C++ code generation for state-machines diagrams and will soon offer it for Java as well. However, it does not offer code generation from sequence diagrams.

Ansgar
Re: Java code generation from UML Behavioral diagrams [message #1784467 is a reply to message #1784458] Wed, 28 March 2018 05:59 Go to previous messageGo to next message
Eclipse UserFriend
Thank you very much for your answer, then if you have any idea to generate the java code from these diagrams can i get the EMF corresponding meta-model and the Ecore model to define an ATL transformation?

Re: Java code generation from UML Behavioral diagrams [message #1785256 is a reply to message #1784467] Wed, 11 April 2018 11:27 Go to previous message
Eclipse UserFriend
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
Previous Topic:Layer function and StateMachines
Next Topic:Usage relationship on sysML palette for IBD?
Goto Forum:
  


Current Time: Sun Jul 13 11:04:25 EDT 2025

Powered by FUDForum. Page generated in 0.03408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top