Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:11 Go to next message
jorge is currently offline jorgeFriend
Messages: 3
Registered: July 2009
Junior Member
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 11:12]

Report message to a moderator

Re: [ATL] Beginner question, How helpers work ? [message #512197 is a reply to message #512192] Thu, 04 February 2010 11:28 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
(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: Tue Apr 23 12:40:26 GMT 2024

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

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

Back to the top