Skip to main content
Jump to: navigation, search

Difference between revisions of "ATL/Model Handlers"

< ATL
(corrected information about uml24atl)
(added CVS links to UML2 driver)
Line 7: Line 7:
 
A model handler driver is a piece of Java code making it possible to use the corresponding model handler with the ATL Virtual Machine.
 
A model handler driver is a piece of Java code making it possible to use the corresponding model handler with the ATL Virtual Machine.
  
The current version of ATL Virtual Machine provides two model handler drivers:
+
The current version of ATL Virtual Machine provides three model handler drivers:
* [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.repositories.emf4atl/ emf4atl] to use [http://www.eclipse.org/emf/ Eclipse/EMF] models,
+
* [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/?root=Modeling_Project emf4atl] to use [http://www.eclipse.org/emf/ Eclipse/EMF],
* [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.repositories.mdr4atl/ mdr4atl] to use [http://mdr.netbeans.org/ Netbeans/MDR] models.
+
* [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/?root=Modeling_Project mdr4atl] to use [http://mdr.netbeans.org/ Netbeans/MDR].
 +
* [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.uml24atl/?root=Modeling_Project uml24atl] to use [http://www.eclipse.org/uml2/ UML2].
  
 
__TOC__
 
__TOC__
Line 28: Line 29:
 
! rowspan=2 | Entity
 
! rowspan=2 | Entity
 
! colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/ GMT/ATL CVS] (old location)
 
! colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/ GMT/ATL CVS] (old location)
! colspan=2 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/?root=Modeling_Project M2M/ATL/plugins CVS] (current location)
+
! colspan=3 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/?root=Modeling_Project M2M/ATL/plugins CVS] (current location)
 
|-
 
|-
! EMF
+
! [http://www.eclipse.org/emf/ Eclipse/EMF]
! MDR
+
! [http://mdr.netbeans.org/ Netbeans/MDR]
! EMF
+
! [http://www.eclipse.org/emf/ Eclipse/EMF]
! MDR
+
! [http://mdr.netbeans.org/ Netbeans/MDR]
 +
! [http://www.eclipse.org/uml2/ UML2]
 
|-
 
|-
 
! plugin
 
! plugin
Line 40: Line 42:
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/?root=Modeling_Project emf4atl]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/?root=Modeling_Project emf4atl]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/?root=Modeling_Project mdr4atl]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/?root=Modeling_Project mdr4atl]
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.uml24atl/?root=Modeling_Project uml24atl]
 
|-
 
|-
 
! ASMModel
 
! ASMModel
 
| colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.vm/src/org/atl/engine/vm/nativelib/ASMModel.java?rev=HEAD&content-type=text/vnd.viewcvs-markup ASMModel]
 
| colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.vm/src/org/atl/engine/vm/nativelib/ASMModel.java?rev=HEAD&content-type=text/vnd.viewcvs-markup ASMModel]
| colspan=2 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine.vm/src/org/eclipse/m2m/atl/engine/vm/nativelib/ASMModel.java?root=Modeling_Project&view=markup ASMModel]
+
| colspan=3 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine.vm/src/org/eclipse/m2m/atl/engine/vm/nativelib/ASMModel.java?root=Modeling_Project&view=markup ASMModel]
 
|-
 
|-
 
! ASM<ModelHandler>Model
 
! ASM<ModelHandler>Model
Line 50: Line 53:
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/src/org/eclipse/m2m/atl/drivers/emf4atl/ASMEMFModel.java?root=Modeling_Project&view=markup ASMEMFModel]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/src/org/eclipse/m2m/atl/drivers/emf4atl/ASMEMFModel.java?root=Modeling_Project&view=markup ASMEMFModel]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/src/org/eclipse/m2m/atl/drivers/mdr4atl/ASMMDRModel.java?root=Modeling_Project&view=markup ASMMDRModel]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/src/org/eclipse/m2m/atl/drivers/mdr4atl/ASMMDRModel.java?root=Modeling_Project&view=markup ASMMDRModel]
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.uml24atl/src/org/eclipse/m2m/atl/drivers/uml24atl/ASMUMLModel.java?root=Modeling_Project&view=markup ASMUMLModel]
 
|-
 
|-
 
! ASMModelElement
 
! ASMModelElement
 
| colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.vm/src/org/atl/engine/vm/nativelib/ASMModelElement.java?rev=HEAD&content-type=text/vnd.viewcvs-markup ASMModelElement]
 
| colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.vm/src/org/atl/engine/vm/nativelib/ASMModelElement.java?rev=HEAD&content-type=text/vnd.viewcvs-markup ASMModelElement]
| colspan=2 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine.vm/src/org/eclipse/m2m/atl/engine/vm/nativelib/ASMModelElement.java?root=Modeling_Project&view=markup ASMModelElement]
+
| colspan=3 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine.vm/src/org/eclipse/m2m/atl/engine/vm/nativelib/ASMModelElement.java?root=Modeling_Project&view=markup ASMModelElement]
 
|-
 
|-
 
! ASM<ModelHandler>ModelElement
 
! ASM<ModelHandler>ModelElement
Line 60: Line 64:
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/src/org/eclipse/m2m/atl/drivers/emf4atl/ASMEMFModelElement.java?root=Modeling_Project&view=markup ASMEMFModelElement]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.emf4atl/src/org/eclipse/m2m/atl/drivers/emf4atl/ASMEMFModelElement.java?root=Modeling_Project&view=markup ASMEMFModelElement]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/src/org/eclipse/m2m/atl/drivers/mdr4atl/ASMMDRModelElement.java?root=Modeling_Project&view=markup ASMMDRModelElement]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/src/org/eclipse/m2m/atl/drivers/mdr4atl/ASMMDRModelElement.java?root=Modeling_Project&view=markup ASMMDRModelElement]
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.uml24atl/src/org/eclipse/m2m/atl/drivers/uml24atl/ASMUMLModelElement.java?root=Modeling_Project&view=markup ASMUMLModelElement]
 
|-
 
|-
 
! AtlModelHandler
 
! AtlModelHandler
 
| colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.eclipse.engine/src/org/atl/eclipse/engine/AtlModelHandler.java?rev=HEAD&content-type=text/vnd.viewcvs-markup AtlModelHandler]
 
| colspan=2 | [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.eclipse.engine/src/org/atl/eclipse/engine/AtlModelHandler.java?rev=HEAD&content-type=text/vnd.viewcvs-markup AtlModelHandler]
| colspan=2 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine/src/org/eclipse/m2m/atl/engine/AtlModelHandler.java?root=Modeling_Project&view=markup AtlEMFModelHandler]
+
| colspan=3 | [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine/src/org/eclipse/m2m/atl/engine/AtlModelHandler.java?root=Modeling_Project&view=markup AtlEMFModelHandler]
 
|-
 
|-
 
! Atl<ModelHandler>ModelHandler
 
! Atl<ModelHandler>ModelHandler
Line 70: Line 75:
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine/src/org/eclipse/m2m/atl/engine/AtlEMFModelHandler.java?root=Modeling_Project&view=markup AtlEMFModelHandler]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.engine/src/org/eclipse/m2m/atl/engine/AtlEMFModelHandler.java?root=Modeling_Project&view=markup AtlEMFModelHandler]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/src/org/eclipse/m2m/atl/drivers/mdr4atl/AtlMDRModelHandler.java?root=Modeling_Project&view=markup AtlMDRModelHandler]
 
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.mdr4atl/src/org/eclipse/m2m/atl/drivers/mdr4atl/AtlMDRModelHandler.java?root=Modeling_Project&view=markup AtlMDRModelHandler]
 +
| [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org.eclipse.m2m.atl/plugins/org.eclipse.m2m.atl.drivers.uml24atl/src/org/eclipse/m2m/atl/drivers/uml24atl/AtlUML2ModelHandler.java?root=Modeling_Project&view=markup AtlUML2ModelHandler]
 
|}
 
|}
  

Revision as of 21:19, 12 September 2007

In ATL engine terminology, a model handler is a library providing primitives for handling models:

  • Creating new models,
  • Loading and saving models,
  • Adding and deleting elements,
  • Reading and writing element properties.

A model handler driver is a piece of Java code making it possible to use the corresponding model handler with the ATL Virtual Machine.

The current version of ATL Virtual Machine provides three model handler drivers:

Creating New Model Handler Drivers

Here is a brief description of the work to be done (see CVS Links table below for links to source code):

  • Extend ASMModel to implement specific model-level behavior. There are already two examples: ASMEMFModel, and ASMMDRModel.
  • Extend ASMModelElement to implement specific model-element-level behavior. There are already two examples: ASMEMFModelElement, and ASMMDRModelElement.
  • Extend AtlModelHandler to implement model loading and saving. There are already two examples: AtlEMFModelHandler, and AtlMDRModelHandler.
  • Use the org.atl.eclipse.engine.modelhandler extension in your plugin.xml to register your model handler driver. There is already one example: mdr4atl plugin.xml.

ATL Development Tools strongly depend on emf4atl, which is consequently built into it. mdr4atl should rather be used as an example for properly placing Java classes and plugin.xml elements.

CVS Links
Entity GMT/ATL CVS (old location) M2M/ATL/plugins CVS (current location)
Eclipse/EMF Netbeans/MDR Eclipse/EMF Netbeans/MDR UML2
plugin emf4atl mdr4atl emf4atl mdr4atl uml24atl
ASMModel ASMModel ASMModel
ASM<ModelHandler>Model ASMEMFModel ASMMDRModel ASMEMFModel ASMMDRModel ASMUMLModel
ASMModelElement ASMModelElement ASMModelElement
ASM<ModelHandler>ModelElement ASMEMFModelElement ASMMDRModelElement ASMEMFModelElement ASMMDRModelElement ASMUMLModelElement
AtlModelHandler AtlModelHandler AtlEMFModelHandler
Atl<ModelHandler>ModelHandler AtlEMFModelHandler AtlMDRModelHandler AtlEMFModelHandler AtlMDRModelHandler AtlUML2ModelHandler

When to Create a New Model Handler Driver

In theory, there should be a distinct model handler driver for each model handler, independently of the metamodel that is used. For instance, there is one for Eclipse/EMF and one for Netbeans/MDR.

In practice, there are exceptions. For instance, the Eclipse/UML2 plugin implements the UML 2.0 metamodel by using EMF. However, it seems that UML2 models created with this plugin cannot be handled by EMF without the additional Java code available in the Eclipse/UML2 plugin (see ATL_Language_Troubleshooter#UML2_Profiles and this thread). This means that the UML2 metamodel that is implemented does not strictly follow EMF rules but adds its own rules. One example is profile and stereotype application: the profile must be applied before the stereotype. Such an ordering constraint is beyond EMF semantics. For this reason, full support for the Eclipse/UML2 plugin can only be properly achieved by adding code specific to this plugin in the model handler driver. Instead of doing this in emf4atl, which is metamodel-independant, the uml24atl model handler driver has been developed.

Back to the top