-
Notifications
You must be signed in to change notification settings - Fork 8
Home
The project can be used in two different ways: With the main class EcoreMetamodelExtraction directly, or as an Eclipse Plugin through the MainHandler class. 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. The class EcoreMetamodelExtraction 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. 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: ###1. Intermediate Model ###2. Java Project Parser ###3. Ecore Metamodel Generator ###4. Saving Ecore metamodels to Ecore files ###5. The Extraction Properties