Skip to content

Ecore metamodel reverse engineering: Automatically extract EMF metamodels from Java code.

License

Notifications You must be signed in to change notification settings

tsaglam/EcoreMetamodelExtraction

Repository files navigation

EcoreMetamodelExtraction

This project is a reverse engineering tool for Ecore metamodels. It allows extracting Ecore metamodels from any arbitrary Java code. At the core of the approach is a mapping from elements of the implicit Java metamodel, which the Java Language Specification defines, to elements of the Ecore meta-metamodel. The project makes heavy use of the EMF Ecore and the Eclipse JDT API.

Open Java projects in the Eclipse IDE can be selected to extract an Ecore Metamodel, which can be saved as an Ecore file. See the wiki for more details on the reverse engineering of Ecore metamodels.

How to install:

  1. Clone or download the project.
  2. Import as existing project into the Eclipse IDE (preferably Eclipse 2018-09 or newer, tested up to 2020-06).
  3. Make sure your IDE installation has log4j installed. If not you can get it from the latest Orbit Build Repository.
  4. You need the Eclipse Modeling Framework and the Eclipse Java Development Tools, make sure that both are installed.
  5. Run the project as Eclipse Application.
  6. You can start the extraction from the context menu of a Java project or from the toolbar (provisional UI).
  7. Extracting metamodels from projects with errors can cause problems while resolving types (or other problems). It is recommended to use code for the reverse engineering of Ecore metamodels that compiles without problems.