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 "MoScript/Use Cases/Megamodel Population Part 2"

(Megamodel Population Part 2)
(Registering artifacts)
Line 8: Line 8:
  
 
===== Registering artifacts  =====
 
===== Registering artifacts  =====
 +
 
  '''program modelsDiscovery'''
 
  '''program modelsDiscovery'''
 
   
 
   
 
  do{
 
  do{
    ''-- Creates the Ecore metametamodel element in the megamodel''
+
''-- Creates the Ecore metametamodel element in the megamodel''
    thisModule.<span style="color:#800000">register</span>(
+
''  thisModule.<span style="color:#800000">register</span>(''
        thisModule.metametamodel(
+
  thisModule.metametamodel(
              thisModule.identifier('identifier', 'http://www.eclipse.org/emf/2002/Ecore', 'GlobalModelManagement::URI')
+
    thisModule.identifier('identifier', 'http://www.eclipse.org/emf/2002/Ecore', 'GlobalModelManagement::URI'),
            ,thisModule.locator('locator', 'http://www.eclipse.org/emf/2002/Ecore',  
+
    thisModule.locator('locator', 'http://www.eclipse.org/emf/2002/Ecore',  
                                            'GlobalModelManagement::EPackagesRegistryLocator')
+
                        'GlobalModelManagement::EPackagesRegistryLocator'
        )
+
    )
    );
+
  )
 +
);
 +
 +
 
  }
 
  }
 +
 +
asdfa
 +
 +
 +
 +
 +
 +
{| width="200" border="1" align="left" cellpadding="1" cellspacing="1"
 +
|-
 +
| 1
 +
|
 +
|}
 +
 +
<br>

Revision as of 10:08, 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
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'
    )
  )
);


}

asdfa



1


Back to the top