Generating Model Code
In order to continue to this step, you must do step 5 correctly and validate your ECore model. Otherwise an error will block you from generating code.
Step 8.0: Preparing
Before proceeding to the next steps, ensure that our project/model folder contains a file named “FinalStateMachine.genmodel”, which is responsible for generating the code.

If you cannot find it, expand the “Creating a .genmodel file” guide below; otherwise, proceed to the next step.
Creating a .genmodel file
Right click on project root then click on New -> Other...

In "Eclipse Modeling Framework" select "EMF Generator Model" and press "Next"

Select model folder and set file name to "FiniteStateMachine.genmodel" then press "Next >" button

Select "Ecore model" and click next button.

Click on "Browse Workspace..." then select your .ecore file, click ok then click Next button.

Confirm root package to generate then click "Finish" button.

Finally, the FinalStateMachine.genmodel file will appear immediately in our project/model folder

Step 8.1: Generating the code
Right click on FiniteStateMachine.genmodel then Open with -> EMF Generator

then

Code can be viewed later in src-gen folder

Last updated