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 "EATOP/metamodelgen"

(Getting the source code)
(Setting the target platform)
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Setting up an Eclipse IDE==
+
This page is for users and developers of EATOP MMGen Tool, which is a tool generator that generates Ecore model and implementation for EATOP Enterprise Architect metamodel, as well as XSD schema. It aims at providing a guide to setup and use EATOP MMGen Tool.
[http://eclipse.org/downloads Download] and [http://wiki.eclipse.org/Eclipse/Installation install] the latest '''Eclipse Modeling Tools''' 32 Bit package.
+
  
 +
==Installation==
  
==Prerequistes==
+
===Prerequistes===
# Windows Vista, 7 (Linux or Mac is not supported)
+
# Windows Vista, 7 or 10 (Linux or Mac is not supported)
 
# Enterprise Architect 9.1 or greater
 
# Enterprise Architect 9.1 or greater
# Latest '''Eclipse Modeling Tools''' 32Bit
+
# [http://eclipse.org/downloads Download] and [http://wiki.eclipse.org/Eclipse/Installation install] the latest '''Eclipse Modeling Tools'''
  
 +
===Getting the source code===
 +
The source code of EATOP MMGen Tool is managed in a [http://git-scm.com Git] repository.
  
==Getting the source code==
+
* Clone the git repository: git://git.eclipse.org/c/eatop/org.eclipse.eatop.git (web https://git.eclipse.org/c/eatop/org.eclipse.eatop.git)
 +
* Import all the plugins that are under ''metamodelgen'' folder into your workspace
  
===Git repository access===
+
===Adding Enterprise Architect API===
 +
Make sure the Enterprise Architect 9.1 or greater has been installed on your computer.
  
The source code of EATOP is managed in a [http://git-scm.com Git] repository that can be accessed in one of the following ways:  
+
* Copy eaapi.jar from your installation, e.g., C:\Program Files (x86)\Sparx Systems\EA\Java API, to:
 +
    org.eclipse.eatop.eaadapter/lib
 +
    org.eclipse.eatop.metamodelgen/lib
 +
* Depending whether your Eclipse is 32 or 64 bits, copy SSJavaCOM.dll or SSJavaCom64.dll from your installation, e.g., C:\Program Files (x86)\Sparx Systems\EA\Java API, to:
 +
    org.eclipse.eatop.eaadapter/lib
 +
    org.eclipse.eatop.metamodelgen/lib
  
Read-only access:
+
If you use the 64-bit version of file SSJavaCom64, modify the MANIFEST.MF files of the two plugins: replace processor=x86 with processor=x86_64
* URL: git://git.eclipse.org/gitroot/eatop/org.eclipse.eatop.git
+
* User name: ''<leave empty>''
+
* Password: ''<leave empty>''
+
  
Commiter access:
+
===Setting the target platform===
* URL: ssh://git.eclipse.org/gitroot/eatop/org.eclipse.eatop.git
+
EATOP MMGen Tool provides target platform definitions for the two latest Eclipse releases. These target definitions are in the project ''org.eclipse.eatop.metamodelgen.tool.targetdefs''.
* User name: ''<YOUR_USER_NAME>''
+
* Open the target definition file ''xxx.target'' that corresponds to the Eclipse release you want to work with;
* Password: ''<YOUR_PASSWORD>''
+
* Wait for the completion of the ''Resolving Target Definition'' operation. This may take a while, in particular at the first time, because all directly and indirectly required target platform plug-ins and features are being downloaded or updated as necessary during that operation. If errors occur, try to close and reopen the target definition file so as to re-trigger the target platform resolution;
 +
* Click on link ''Set as Target Platform'' (in the upper right corner of the target editor).
  
===Cloning and importing the source code with EGit===
+
You can also manually add required plugins, notably:
 +
* Add Sphinx via the update-site http://download.eclipse.org/sphinx/previews
 +
* Add JET template plugins 1.2.0m2 from https://www.eclipse.org/modeling/m2t/downloads/?project=jet. As this is not an update-site, add the plugins from the zip file into your dropins folder
  
The recommended way to clone and import the source code of EATOP is to use [http://eclipse.org/egit EGit] - the Eclipse Team provider for Git:
+
==User guide==
* Open the ''Git Repository Exploring'' perspective
+
* Click on the ''Clone a Git Repository and add the clone to this view'' button
+
* Enter the Git repository access data using one of the options indicated above, and then click on ''Next''
+
* Select the relevant Git repository branches (e.g. ''master''), and then click on ''Next''
+
* Make sure that ''Import all existing projects after clone finishes'' is checked and then click on ''Finish''
+
* Wait until the cloning process has been completed and go back to the ''Plug-in Development'' perspective
+
  
==Setting the target platform==
+
===Step 1: Create a project for EATOP metamodel===
 +
# Open menu ''File &gt; New &gt; Other...'', select ''Java Projec''. Click on ''Next''.
 +
# Set the project name, “org.eclipse.eatop.eastadl2112”. Click on ''Finish''.
 +
# Create a new folder “model” under this project. Copy the EATOP metamodel Enterprise Architect EAP file into the “model” file. Rename the file to be “eastadl2112.eap”.
 +
 
 +
===Step 2: Import EATOP projects===
 +
Import the following projects from EATOP repository into the MMGen’s runtime workspace:
 +
    org.eclipse.eatop.common
 +
    org.eclipse.eatop.common.ui
 +
    org.eclipse.eatop.geastadl
 +
    org.eclipse.eatop.geastadl.edit
 +
    org.eclipse.eatop.serialization
 +
 
 +
===Step 3: Create EATOP Ecore metamodel===
 +
Right click on the “eastadl2112.eap” file, open menu “EATOP – Generate EATOP Ecore MM”, select one of the following command: 
 +
 
 +
* ''Generate (persistence mapping only) Ecore only'': to generate persistence mapping Ecore only
 +
* ''Generate Ecore + MM EMF Code'': to generate persistence mapping Ecore and the metamodel code implementation
 +
* ''Generate Ecore + XSD Schema'': to generate persistence mapping Ecore and the XSD shcema
 +
* ''Generate All (Ecore + MM EMF Code + XSD Schema)'': to generate persistence mapping Ecore, metamodel code implementation and the XSD schema.
 +
 
 +
Wait until the Ecore metamodel generation has been finished.
 +
 
 +
Note:
 +
* Please make sure that the following resources should be removed before you start to generate the metamodel:
 +
    org.eclipse.eatop.eastadl2112: /src-gen, /META-INF, /model/eastadl2112.*, /model/geastadl.*, build.properties, plugin.properties, plugin.xml
 +
    org.eclipse.eatop.eastadl2112
 +
* At the end of the generation, a validation of the Ecore is performed. Some validation failure error is pumped up: "Generated the Ecore. Attention, the generated Ecore contains errors, please validate it to see the errors". It does not affect the generated metamodel, the reason is caused by some default values not setting. Just click on “OK”.

Latest revision as of 06:30, 5 February 2020

This page is for users and developers of EATOP MMGen Tool, which is a tool generator that generates Ecore model and implementation for EATOP Enterprise Architect metamodel, as well as XSD schema. It aims at providing a guide to setup and use EATOP MMGen Tool.

Installation

Prerequistes

  1. Windows Vista, 7 or 10 (Linux or Mac is not supported)
  2. Enterprise Architect 9.1 or greater
  3. Download and install the latest Eclipse Modeling Tools

Getting the source code

The source code of EATOP MMGen Tool is managed in a Git repository.

Adding Enterprise Architect API

Make sure the Enterprise Architect 9.1 or greater has been installed on your computer.

  • Copy eaapi.jar from your installation, e.g., C:\Program Files (x86)\Sparx Systems\EA\Java API, to:
   org.eclipse.eatop.eaadapter/lib
   org.eclipse.eatop.metamodelgen/lib
  • Depending whether your Eclipse is 32 or 64 bits, copy SSJavaCOM.dll or SSJavaCom64.dll from your installation, e.g., C:\Program Files (x86)\Sparx Systems\EA\Java API, to:
   org.eclipse.eatop.eaadapter/lib
   org.eclipse.eatop.metamodelgen/lib

If you use the 64-bit version of file SSJavaCom64, modify the MANIFEST.MF files of the two plugins: replace processor=x86 with processor=x86_64

Setting the target platform

EATOP MMGen Tool provides target platform definitions for the two latest Eclipse releases. These target definitions are in the project org.eclipse.eatop.metamodelgen.tool.targetdefs.

  • Open the target definition file xxx.target that corresponds to the Eclipse release you want to work with;
  • Wait for the completion of the Resolving Target Definition operation. This may take a while, in particular at the first time, because all directly and indirectly required target platform plug-ins and features are being downloaded or updated as necessary during that operation. If errors occur, try to close and reopen the target definition file so as to re-trigger the target platform resolution;
  • Click on link Set as Target Platform (in the upper right corner of the target editor).

You can also manually add required plugins, notably:

User guide

Step 1: Create a project for EATOP metamodel

  1. Open menu File > New > Other..., select Java Projec. Click on Next.
  2. Set the project name, “org.eclipse.eatop.eastadl2112”. Click on Finish.
  3. Create a new folder “model” under this project. Copy the EATOP metamodel Enterprise Architect EAP file into the “model” file. Rename the file to be “eastadl2112.eap”.

Step 2: Import EATOP projects

Import the following projects from EATOP repository into the MMGen’s runtime workspace:

   org.eclipse.eatop.common
   org.eclipse.eatop.common.ui
   org.eclipse.eatop.geastadl
   org.eclipse.eatop.geastadl.edit
   org.eclipse.eatop.serialization

Step 3: Create EATOP Ecore metamodel

Right click on the “eastadl2112.eap” file, open menu “EATOP – Generate EATOP Ecore MM”, select one of the following command:

  • Generate (persistence mapping only) Ecore only: to generate persistence mapping Ecore only
  • Generate Ecore + MM EMF Code: to generate persistence mapping Ecore and the metamodel code implementation
  • Generate Ecore + XSD Schema: to generate persistence mapping Ecore and the XSD shcema
  • Generate All (Ecore + MM EMF Code + XSD Schema): to generate persistence mapping Ecore, metamodel code implementation and the XSD schema.

Wait until the Ecore metamodel generation has been finished.

Note:

  • Please make sure that the following resources should be removed before you start to generate the metamodel:
   org.eclipse.eatop.eastadl2112: /src-gen, /META-INF, /model/eastadl2112.*, /model/geastadl.*, build.properties, plugin.properties, plugin.xml
   org.eclipse.eatop.eastadl2112 
  • At the end of the generation, a validation of the Ecore is performed. Some validation failure error is pumped up: "Generated the Ecore. Attention, the generated Ecore contains errors, please validate it to see the errors". It does not affect the generated metamodel, the reason is caused by some default values not setting. Just click on “OK”.

Back to the top