[ATL] Beginner question, How helpers work ? [message #512192] |
Thu, 04 February 2010 11:11 |
jorge 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02963 seconds