Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Beginner question, How helpers work ?(Beginner, helpers)
[ATL] Beginner question, How helpers work ? [message #512192] Thu, 04 February 2010 06:11 Go to next message
Eclipse UserFriend
Hello everyone. I'm new at ATL, I've already read the manual but I don't understood well how helpers works. I'm trying to do a mapping whith a helper but ATL don't allow me.
Why ATL is telling me this ?

INFO: Execution terminated due to error (see launch configuration to allow continuation after errors).
GRAVE: ERROR: could not find operation hasID on MOF!EClass having supertypes: [MOF!EClassifier, OclType, OclAny] (including Java operations)
java.lang.RuntimeException: ERROR: could not find operation hasID on MOF!EClass having supertypes: [MOF!EClassifier, OclType, OclAny] (including Java operations)


This is my code fragment.

helper context Ecore !EClass def : hasID: Boolean  =  self.eStructuralFeatures->includes (n | n.oclIsTypeOf(Ecore!EAttribute).iD() = true  ) ;

rule clase {
	from c1:  Ecore !EClass 
		(c1.hasID()=false)
	
	to      c2: Ecore !EClass 
	(
			name <- c1.name,
			eStructuralFeatures <- c1.eStructuralFeatures->select (m | m.oclIsTypeOf(Ecore!EAttribute) or m.oclIsTypeOf(Ecore!EReference))->including (pkey)
	)
	,
	pkey : Ecore!EAttribute 
	(
          name <- c1.name.concat('_COD')
    )	
}


Thank you, in advance

[Updated on: Thu, 04 February 2010 06:12] by Moderator

Re: [ATL] Beginner question, How helpers work ? [message #512197 is a reply to message #512192] Thu, 04 February 2010 06:28 Go to previous message
Eclipse UserFriend
(c1.hasID=false) will do it Smile
Previous Topic:[Xtend] How to create an XSD schema?
Next Topic:[ATL] BPMN to BPEL, paternity problems for GatewayDataBasedExclusive/If
Goto Forum:
  


Current Time: Sun Jul 06 22:53:02 EDT 2025

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

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

Back to the top