Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Papyrus/Codegen/CppHelloWorld"

Line 16: Line 16:
 
     I started with the Eclipse Modeling Tools packages and added the other components from there.
 
     I started with the Eclipse Modeling Tools packages and added the other components from there.
 
     To check your Eclipse version, select "Help" from the main menu and select "About Eclipse".
 
     To check your Eclipse version, select "Help" from the main menu and select "About Eclipse".
 +
 
[[File:About.PNG]]
 
[[File:About.PNG]]
 +
 
     ''Q. Is there a minimum version that can be used?''
 
     ''Q. Is there a minimum version that can be used?''
 
     ''TODO: Add a link to instructions on installing Eclipse.''
 
     ''TODO: Add a link to instructions on installing Eclipse.''
Line 24: Line 26:
 
     To check your Papyrus version, select "Help" from the main menu and select "About Eclipse".
 
     To check your Papyrus version, select "Help" from the main menu and select "About Eclipse".
 
     In the resulting popup window, click on the Papyrus icon.
 
     In the resulting popup window, click on the Papyrus icon.
 +
 
[[File:About2.png]]
 
[[File:About2.png]]
 
[[File:PapyrusVersion.PNG]]
 
[[File:PapyrusVersion.PNG]]
 +
 
     NOTE: An existing hello world example is available via File->New->Example however it is broken in version 2.0.3.  
 
     NOTE: An existing hello world example is available via File->New->Example however it is broken in version 2.0.3.  
 
           This guide was created using a nightly snapshot pending the release of 2.0.4 where the issue should be resolved. See this forum thread for more information: [https://www.eclipse.org/forums/index.php/t/1082282/]
 
           This guide was created using a nightly snapshot pending the release of 2.0.4 where the issue should be resolved. See this forum thread for more information: [https://www.eclipse.org/forums/index.php/t/1082282/]
Line 42: Line 46:
 
Now everything is installed, start Eclipse.
 
Now everything is installed, start Eclipse.
 
Open the Papyrus perspective. Select Window->Perspective->Open Perspective->Other... from the main menu.
 
Open the Papyrus perspective. Select Window->Perspective->Open Perspective->Other... from the main menu.
 +
 
[[File:EclipsePerspectiveMenu.PNG]]
 
[[File:EclipsePerspectiveMenu.PNG]]
 +
 
The "Open Perspective" window pops up.
 
The "Open Perspective" window pops up.
 +
 
[[File:OpenPerspective.PNG]]
 
[[File:OpenPerspective.PNG]]
 +
 
Select Papyrus and then click the OK button.
 
Select Papyrus and then click the OK button.

Revision as of 13:06, 27 April 2017

Create a C++ Hello World Example

This walkthrough is a work in progress and as such it is incomplete!!!

Goals

Starting from a blank page, create a Papyrus/C++ "Hello World" example, then generate and run the resulting C++ code.

The screenshots were created running Eclipse on a Windows 7 machine. Your result will probably look slight different when run on a different OS.


Prerequisites

1 Eclipse

   Eclipse Neon.3 release 4.6.3 was used to create the example.
   I started with the Eclipse Modeling Tools packages and added the other components from there.
   To check your Eclipse version, select "Help" from the main menu and select "About Eclipse".

About.PNG

   Q. Is there a minimum version that can be used?
   TODO: Add a link to instructions on installing Eclipse.

2 Papyrus (obviously!)

   Papyrus version 2.0.3 was used to create this example.
   To check your Papyrus version, select "Help" from the main menu and select "About Eclipse".
   In the resulting popup window, click on the Papyrus icon.

About2.png PapyrusVersion.PNG

   NOTE: An existing hello world example is available via File->New->Example however it is broken in version 2.0.3. 
         This guide was created using a nightly snapshot pending the release of 2.0.4 where the issue should be resolved. See this forum thread for more information: [1]
   Q. Is there a minimum version that can be used?
   TODO: Add a link to instructions on installing Papyrus on the Eclipse.

3 A C++ tool chain

   I used the g++ compiler and make in cygwin.

4 Eclipse CDT (Optional)

   I used version 9.2.1 for these examples.


Setup

Now everything is installed, start Eclipse. Open the Papyrus perspective. Select Window->Perspective->Open Perspective->Other... from the main menu.

EclipsePerspectiveMenu.PNG

The "Open Perspective" window pops up.

OpenPerspective.PNG

Select Papyrus and then click the OK button.

Back to the top