Status of code generation in Papyrus? [message #1030018] |
Sat, 30 March 2013 10:54  |
Eclipse User |
|
|
|
Everyone,
I have imported a UML model from IBM Rational Software Architect into Papyrus and I would like to generate code from it. I found some tutorials on the old Papyrus site showing videos of the code generator (run via run configurations), but it appears to be unavailable in Eclipse Juno SR2. It is listed, but not discussed in the user's guide at:
http://wiki.eclipse.org/Papyrus_User_Guide#C.2FC.2B.2B_Code_Generation
Could someone please tell me what the status is of this capability? It is available now, planned for some future release or unplanned?
Thanks!
Jay
|
|
|
Re: Status of code generation in Papyrus? [message #1030124 is a reply to message #1030018] |
Sat, 30 March 2013 14:27   |
Eclipse User |
|
|
|
Hi
It depends what you mean by code generation.
If you just want class structure (Package, Class, Property, Operation) ,
that has been available for a long time via the UML to Ecore converter.
EMF supports generation of Java from the Ecore model.
If you also want OCL elaboration of Class invariants and Operation
bodies, then you will be pleased to know that a stupid bug has been
fixed for Kepler so that the OCL is correctly expressed as Ecore
delegates for interpretation at run-time. You may be even more pleased
that the OCL to Java code generator is fully integrated so that if you
genmodel you get compiled Java for the OCL.
If you also want more advanced UML facilities such as State Machines,
you need to look for additional tooling. I suspect that Acceleo may have
some examples.
You may note that none of the above is a Papyrus facility; they are more
general.
Regards
Ed Willink
On 30/03/2013 14:54, Jay Billings wrote:
> Everyone,
>
> I have imported a UML model from IBM Rational Software Architect into
> Papyrus and I would like to generate code from it. I found some
> tutorials on the old Papyrus site showing videos of the code generator
> (run via run configurations), but it appears to be unavailable in
> Eclipse Juno SR2. It is listed, but not discussed in the user's guide at:
>
> http://wiki.eclipse.org/Papyrus_User_Guide#C.2FC.2B.2B_Code_Generation
>
> Could someone please tell me what the status is of this capability? It
> is available now, planned for some future release or unplanned?
>
> Thanks!
>
> Jay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Status of code generation in Papyrus? [message #1069840 is a reply to message #1069774] |
Tue, 16 July 2013 13:32  |
Eclipse User |
|
|
|
Hi
In principle the standard
define your UML models (see OCL in UML (using Papyrus) in the OCL
Documentation
create/use your genmodel
should just work. If you want embedded OCL to be code generated rather
than interpreted
see "Code Generation tutorial" in the OCL Documentation
Regards
Ed Willink
On 16/07/2013 15:27, Tahar gh wrote:
> Hi Ed.
>
> thanks for your replies concerning papyrus use!
>
> I still have a question: if we elaborate a profile (defining
> stereotypes for classes and actions) with papyrus and use it to
> construct models (class diagrams and state-machines, both containing
> stereotypes), how can one generate java code from the etablished
> models (I mean from stereotyped class diagrams and statemachines)?
>
> thank you in advance
|
|
|
Powered by
FUDForum. Page generated in 0.07620 seconds