-
Notifications
You must be signed in to change notification settings - Fork 70
howto_EA client generation
We are going to show you how to generate source code from an Enterprise Architect diagram using CobiGen.
If CobiGen_Templates is not already imported into your workspace, follow the next steps:
-
Click on the Eclipse’s menu File > Import > Existing Projects into Workspace and browse to select the
workspaces/main/CobiGen_Templates
directory. -
Click Finish and you should have the CobiGen_Templates as a new project in Eclipse’s workspace.
Also verify that you have the latest templates of CobiGen. Your templates folder must contain the crud_java_ea_uml
folder.
If you do not see it, please follow the next steps:
-
Download the accumulative patch.
-
Open the zip file and extract its content inside the root folder of your Devonfw distribution Devon-dist_2.4.0/
After following those steps correctly, you should have the latest version of the templates ready to use.
In this tutorial, we are going to generate the entity infrastructure using as input a class diagram, modelled with Enterprise Architect (EA). First, create a class diagram, an example is shown on figure below:
When you are finished, you will have to export that UML diagram into an XMI version 2.1 file. This is the file format that CobiGen understands. See below a figure showing this process:
To open that window, see this tutorial.
After having that exported file, change its extension from xmi
to xml
. Then create an devon4j project and import the exported file into the core
of your devon4j project.
Now we are going to start the generation, right-click your exported file and select CobiGen > Generate, finally select the entity infrastructure increment:
After following all these steps, your generated files should be inside src\main\java
folder. If you want an XMI example, you will find it here.
Disclaimer
If you discover any documentation bugs or would like to request new content, please raise them as an issue or create a pull request. Contributions to this wiki are done through the main repo under the folder documentation.
License
This documentation is licensed under the Creative Commons License (Attribution-NoDerivatives 4.0 International
)