Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] How to generate C code

Andrea, Eric,

the current C++ code generator within Papyrus is based on Acceleo. It is more tightly integrated with Papyrus compared to the standard way to use Acceleo:
- you do not need to save your model first, the generation can be invoked from a context menu in Papyrus and is based on the current model in memory.
- there is a CDT integration which opens the file associated with a model element (class or datatype) and re-generates this file automatically whenever the associated model element changes.

The integration is done by the plugins org.eclipse.papyrus.acceleo and oep.acceleo.ui. The C++ specific part is done in oep.cpp.codegen (+.ui), all in the folder extraplugins/codegen.

Btw. a code generator for C or C++ must handle C++ specific aspects that can not be expressed directly in UML (e.g. virtual methods, parameter referencing and so on). Therefore, Papyrus contains a C/C++ profile that is taken into account by our generators. You can find some information about the profile here:
https://wiki.eclipse.org/Papyrus/Codegen/Cpp_description


Regards

Ansgar
________________________________________
From: mdt-papyrus.dev-bounces@xxxxxxxxxxx [mdt-papyrus.dev-bounces@xxxxxxxxxxx] on behalf of Eric TOSI [e.tosi@xxxxxxxxxxxx]
Sent: Thursday, July 24, 2014 4:36 PM
To: 'Papyrus Project list'
Subject: Re: [mdt-papyrus.dev] How to generate C code

Andrea ,

Acceleo works directly with UML Model.
You have to save your updates in Papyrus and then launch the code
generation.

The start link for Acceleo is there : http://eclipse.org/acceleo/ -
http://wiki.eclipse.org/Acceleo
And you fill find a quick presentation there :
http://www.infoq.com/presentations/Acceleo

Hope this help,
Regards,
Eric

-----Message d'origine-----
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx
[mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de andrea toscan
Envoyé : jeudi 24 juillet 2014 16:23
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] How to generate C code

Thank you Eric.
Have you got a link where I can read about how to use Acceleo with Papyrus?

Regards.

A.

On 07/23/2014 11:32 AM, Eric TOSI wrote:
> Hi Andrea,
>
> You can also use model to text plugin to generate your code.
> Papyrus fill your UML model, and the plugin read it and generate your
code.
>
> I use Acceleo plugin to generate C# code and work like a charm.
> https://www.eclipse.org/acceleo/
>
> Regards,
> Eric
>
> -----Message d'origine-----
> De : mdt-papyrus.dev-bounces@xxxxxxxxxxx
> [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Andrea
> Toscan Envoyé : mercredi 23 juillet 2014 10:09 À :
> mdt-papyrus.dev@xxxxxxxxxxx Objet : [mdt-papyrus.dev] How to generate
> C code
>
> Hello,
> I'm looking for a tool that gives the possibility to generate C code
> from UML model.
> For me it is not clear if something exist for Papyrus.
> Does someone have anything to suggest?
>
> Thank you.
>
> Regards
>
> --
> Ing. Andrea Toscan, Project Leader
> Bluewind Embedded System Design
>
> e-mail: andrea.toscan@xxxxxxxxxxx
> skype: andrea.toscan.bluewind
> it.linkedin.com/pub/andrea-toscan/b/409/132
>
>
> www.bluewind.it
>
>
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
>
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


--
Ing. Andrea Toscan, Project Leader
Bluewind Embedded System Design

mobile: +39 338 5324872
telephone (Bluewind): +39 0423 723431
telephone (direct): +39 0423 744742
e-mail: andrea.toscan@xxxxxxxxxxx
skype: andrea.toscan.bluewind

Address:
via Della Borsa, 16/A int.5
31033 Castelfranco Veneto
Treviso - Italy

www.bluewind.it

_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev

_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


Back to the top