Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] The generate atl plugin works differently from atl configuration
[ATL] The generate atl plugin works differently from atl configuration [message #826775] Thu, 22 March 2012 13:44 Go to next message
_md2_ on Forum is currently offline _md2_ on Forum
Messages: 8
Registered: February 2012
Location: L'Aquila
Junior Member
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 #826905 is a reply to message #826775] Thu, 22 March 2012 16:38 Go to previous messageGo to next message
William Piers is currently offline William Piers
Messages: 297
Registered: July 2009
Senior Member
Did you try to put allowInterModelReferences options to "true" (and uncomment the line) ?
Re: [ATL] The generate atl plugin works differently from atl configuration [message #829448 is a reply to message #826905] Mon, 26 March 2012 09:51 Go to previous message
_md2_ on Forum is currently offline _md2_ on Forum
Messages: 8
Registered: February 2012
Location: L'Aquila
Junior Member
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
Previous Topic:[ATL] Transformation to OWL2 functional-style syntax: is owl2.ecore proper for this task?
Next Topic:[ATL] Transform several elements into one element
Goto Forum:
  


Current Time: Tue Sep 16 23:50:50 GMT 2014

Powered by FUDForum. Page generated in 0.02086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software