Transformation plugging
Identifier:
org.eclipse.gmt.weaver.transformationID
Since:
AMW 2006
Description:
This extension point enables defining matching and higher order transformations that can be executed directly using the menus of the weaving panel.
The transformations must follows a specific signature.
There is two types of transformations that can be executed:
- matching:
create OUT : AMW from IN : AMW, left : MOF, right : MOF;
- hot
create OUT : ATL from IN : AMW, left: MOF, right: MOF;
The developer must indicate the transformation .asm, and which references from the weaving model are set up to the left and right references.
Configuration Markup:
<!ELEMENT extension (matching* , hot*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #REQUIRED>
- point - The defined extension point ID
- id - Its own ID (used for identification)
<!ELEMENT matching (binding+)>
<!ATTLIST matching
transformation CDATA #REQUIRED
description CDATA #REQUIRED
file_suffix CDATA #REQUIRED
type CDATA #IMPLIED>
- transformation -
- description -
- file_suffix -
- type -
<!ELEMENT hot (binding+)>
<!ATTLIST hot
transformation CDATA #IMPLIED
description CDATA #REQUIRED
file_suffix CDATA #REQUIRED>
- transformation -
- description -
- file_suffix -
<!ELEMENT binding EMPTY>
<!ATTLIST binding
reference CDATA #REQUIRED
header CDATA #REQUIRED>
Examples:
This example defines one matching and one higher order transformation. The "leftM" reference of the weaving model is assigned to the "left" model of the transformation. The "rightM" reference of the weaving model is assigned to the "right" model of the transformation.
The other models are calculated automatically.
<plugin>
<extension
id=
"TransformationExtension"
point=
"org.eclipse.gmt.weaver.transformationID"
>
<matching transformation=
"transformations/Assign_NameSimbyType.asm"
description=
"Name similarity"
file_suffix=
"name"
>
<binding reference=
"leftM"
header=
"left"
/>
<binding reference=
"rightM"
header=
"right"
/>
</matching>
<hot transformation=
"transformations/AMWtoATL_Match.asm"
description=
"Generate transformation"
file_suffix=
"hot"
>
<binding reference=
"leftM"
header=
"left"
/>
<binding reference=
"rightM"
header=
"right"
/>
</hot>
</extension>
</plugin>
Supplied Implementation:
There is a default implementation of this extension point in the Transformation Extension plugin "org.eclipse.gmt.weaver.transformation".