[ATL] The generate atl plugin works differently from atl configuration [message #826775] |
Thu, 22 March 2012 09:44  |
Eclipse User |
|
|
|
Hi all,
I have realized an ATL trasformation.
I checked the results of transformation with the ATL configuration. It works correctly and the models are consistent with their meta models.
Now I'm making the plugin to perform this transformation using ATL wizard Plugin. When I run the transformation using the plugin, it produces an empty model(only the root child is appended). There are some properties to be specified in the .proprierties file? There may be errors in the transformation? (sounds strange, I repeat that launched with ATL configuration returns it return accurate and conform model)
# ==============================================================================
# Diff2EcoreDiff2 properties
# ==============================================================================
# ATL modules: if several, by order of superimposition (the latter ones overrides the former ones)
Diff2EcoreDiff2.modules = Diff2EcoreDiff2.atl
# Metamodels paths or nsUris
Diff2EcoreDiff2.metamodels.diff = Diff2EcoreDiff2.metamodels.EcoreDiff = platform:/plugin/org.eclipse.m2m.atl.EMFCompare2EcoreDiff/src/MetaModel/diff.ecore
Diff2EcoreDiff2.metamodels.EcoreDiff = platform:/plugin/org.eclipse.m2m.atl.EMFCompare2EcoreDiff/src/MetaModel/EcoreDiff.ecore
# Libraries paths
# ATL Launching options
#Diff2EcoreDiff2.options.allowInterModelReferences = false
Diff2EcoreDiff2.options.supportUML2Stereotypes = false
Diff2EcoreDiff2.options.printExecutionTime = false
Diff2EcoreDiff2.options.OPTION_CONTENT_TYPE = false
Diff2EcoreDiff2.options.step = false
PS: this transformation needs to inter-model references
|
|
|
|
Re: [ATL] The generate atl plugin works differently from atl configuration [message #829448 is a reply to message #826905] |
Mon, 26 March 2012 05:51  |
Eclipse User |
|
|
|
hi,
thanks for the reply,
I have cut and pasted the wrong code, obviously I tried all possible settings. Now I have discovered the problem. The problem are in the trasformation.
The following code shows a significant step in the transformation where the error is hidden. If the transformation is launched through configuration there are no problems and the models are compliant.
If the transformation is launched via plug-ins, helper isPackage can not control the type of rightParent because a.rightParent.eClass().name does not return the correct type but the generic 'eObject' unlike the launch via configuration. The source metamodel is diff.ecore from EMFCompare plugin. It uses elements of ecore.ecore and I need to know this type in the trasformation. Since I use these controls to identify the type and so the rule everywhere, how can I fix this? Why are two ways to launch the plugin work differently? is a problem of settings?
helper def : isPackage (a : diff!DiffGroup): Boolean =
if(a.rightParent<>OclUndefined)
then then if(a.rightParent.eClass().name='EPackage')
then true
else false
endif
else false
endif;
rule DiffGroup2ChangedPackage {
from
sor : diff!DiffGroup (thisModule.isPackage(sor))
to
element : EcoreDiff!ChangedEPackage(
name <- sor.rightParent.name
...
...
),
sorgente : EcoreDiff!EPackage(
name <- sor.rightParent.name
...
)
}
I apologize for my English, I hope I was clear enough.
regards Juri
|
|
|
Powered by
FUDForum. Page generated in 0.24155 seconds