Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » how to enable code generation?(If you have an existing Papyrus project, how do you enable C++ code generation?)
how to enable code generation? [message #1749692] Fri, 09 December 2016 17:53 Go to next message
Allen Curtis is currently offline Allen CurtisFriend
Messages: 3
Registered: December 2016
Junior Member
Hello,

Is it possible to enable C++ code generation for an existing Papyrus project? I have been able to create a new project with this capability. However I can not figure out how to enable this feature after the fact.

Thanks
Re: how to enable code generation? [message #1749755 is a reply to message #1749692] Sun, 11 December 2016 09:33 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Allen,

Yes it is possible.

Beside the Papyrus Designer (https://wiki.eclipse.org/Papyrus_Software_Designer) other choices are
* Eclipse Obeo Acceleo (https://eclipse.org/acceleo/)
and
* Eclipse XPand (https://eclipse.org/modeling/m2t/?project=xpand).

Which of these three choices fits best, depends on your specific needs.

All three choices can be added to existing projects. But most likely the existing models have to be adapted to fit the requirements of the generator.

Best regards
Carsten

[Updated on: Sun, 11 December 2016 09:38]

Report message to a moderator

Re: how to enable code generation? [message #1749820 is a reply to message #1749755] Mon, 12 December 2016 21:55 Go to previous messageGo to next message
Allen Curtis is currently offline Allen CurtisFriend
Messages: 3
Registered: December 2016
Junior Member
Hello,

I believe by default the code generator is Obeo Acceleo. How is this enabled for an existing project?

Thanks
Re: how to enable code generation? [message #1749824 is a reply to message #1749820] Mon, 12 December 2016 22:15 Go to previous messageGo to next message
Allen Curtis is currently offline Allen CurtisFriend
Messages: 3
Registered: December 2016
Junior Member
Hello again Carsten,

I went back to the Eclipse software configuration. This is what is reported for C++ code generation.

Papyrus C++ profile, view and code generation (Incubation) 1.0.3 org.eclipse.papyrus.designer.languages.cpp.feature.feature.group Eclipse Modeling Project
C/C++ Development Tools 9.1.0.201609121658 org.eclipse.cdt.feature.group Eclipse CDT
C/C++ Common GDB Support 9.1.0.201609121658 org.eclipse.cdt.gdb.feature.group Eclipse CDT
C/C++ Development Platform 9.1.0.201609121658 org.eclipse.cdt.platform.feature.group Eclipse CDT
C/C++ Development Tooling Native Utilities 9.1.0.201609121658 org.eclipse.cdt.native.feature.group Eclipse CDT
C/C++ DSF GDB Debugger Integration 9.1.0.201609121658 org.eclipse.cdt.gnu.dsf.feature.group Eclipse CDT
C/C++ GNU Toolchain Build Support 9.1.0.201609121658 org.eclipse.cdt.gnu.build.feature.group Eclipse CDT
C/C++ GNU Toolchain Debug Support 9.1.0.201609121658 org.eclipse.cdt.gnu.debug.feature.group Eclipse CDT
Papyrus base elements for code generation (Incubation) 1.0.3 org.eclipse.papyrus.designer.languages.common.feature.feature.group Eclipse Modeling

I don't see either of those packages installed.

Allen
Re: how to enable code generation? [message #1749846 is a reply to message #1749824] Tue, 13 December 2016 08:21 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Allen,

your list only contains CDT (C/C++ Development Tool) parts. Consequently I assume Eclipse Obeo Acceleo is not installed.

Best regards
Carsten
Re: how to enable code generation? [message #1749870 is a reply to message #1749824] Tue, 13 December 2016 12:46 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

Hi Allen,

Did you install the Papyrus Designer-CPP Additional Component?

Doing so would bring in all the resources to be able too do code generation to C++.

To install Designer-CPP, you can do the following:


  1. Click on the first "Papyrus Ibis" icon on the toolbar (the one without a drop-down menu) - this will bring up the "Additional Components Discovery" dialog.
  2. Select the "Designer-CPP" extension.
  3. Click [Finish]


After restarting Papyrus, you will have the Designer-CPP menu items.


/Charles Rivet
Re: how to enable code generation? [message #1749890 is a reply to message #1749820] Tue, 13 December 2016 14:29 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 461
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Hi Allen,

if you install Papyrus SW designer (and in particular the C++ or Java code generation), the code generation will be technically based on xtend. Thus, there is no need to install Acceleo.

The C++ or Java code generators support structural code generation and behavior in form of opaque behavior declarations inside the model. There is a quite complete support for state-machine code generation based on a model-2-model transformation that is executed prior to code generation. A good starting point are the examples. (File->New Example).
Previous Topic:Hide Welcome page
Next Topic:Beginner question - sequence diagram drag&drop
Goto Forum:
  


Current Time: Fri Apr 26 01:25:36 GMT 2024

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

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

Back to the top