-
Notifications
You must be signed in to change notification settings - Fork 8
Home
The project can be used in two different ways. One can use the project as an Eclipse Plugin through the MainHandler class, or address directly the main class EcoreMetamodelExtraction.
-
When using it as a plugin, a simple dialog allows choosing a Java project which is then used to extract a metamodel. The metamodel is saved with the saving strategy specified in the properties file.
-
When working with the class EcoreMetamodelExtraction directly, it offers three simple methods to work with. The method getProperties() grants access to the instance of the class ExtractionProperties, which allows to configure the extraction process programmatically. This can also be done through editing the properties file before running the program. With the methods extractFrom() and extractAndSaveFrom() the metamodel extraction is started for a given IProject.
Even though the EcoreMetamodelExtraction consists out of seven packages, the general architecture can be broken down to three parts: The parser, the intermediate model and the generator. The parser analyzes a Java project using the JDT API and extracts all the information the implicit model of the Java code contains. With these information the parser then builds an intermediate model. The generator then uses the intermediate model to build an Ecore metamodel. The Ecore metamodel is build as a tree structure out of EObjects, with a root package as container of all the elements of the metamodel. The generator also has the ability to save the generated Ecore metamodel as an Ecore file. For this process, there are several different saving strategies available.
To understand the different parts of the project, see the following pages: