Difference between revisions of "MoScript/Use Cases/Megamodel Population Part 2"

From Eclipsepedia

Jump to: navigation, search
(Registering artifacts)
(Environment Preparation)
Line 5: Line 5:
  
 
* Download the Families to Persons source code from [http://www.eclipse.org/m2m/atl/atlTransformations/#Families2Persons here]
 
* Download the Families to Persons source code from [http://www.eclipse.org/m2m/atl/atlTransformations/#Families2Persons here]
* Unzip the project and import it into eclipse
+
* Unzip the project and import it into eclipse copying the fiels into the workspace
  
 
===== Registering artifacts  =====
 
===== Registering artifacts  =====

Revision as of 10:30, 23 December 2011

Megamodel Population Part 2

Continuing with the use case Megamodel Population Part 1, this use cases shows how to programmatically populate the megamodel with models, metamodels and transformations. For this purpose we are going to populate it with the content of an ATL project that can be found in the ATL Transformations Zoo

Environment Preparation
  • Download the Families to Persons source code from here
  • Unzip the project and import it into eclipse copying the fiels into the workspace
Registering artifacts
program modelsDiscovery

do{
-- Creates the Ecore metametamodel element in the megamodel
  thisModule.register(
  thisModule.metametamodel(
    thisModule.identifier('identifier', 'http://www.eclipse.org/emf/2002/Ecore', 'GlobalModelManagement::URI'),
    thisModule.locator('locator', 'http://www.eclipse.org/emf/2002/Ecore', 
                       'GlobalModelManagement::EPackagesRegistryLocator'
    )
  )
);