Can I use foreach in called rules? [message #70009] |
Thu, 20 December 2007 09:48 |
Eclipse User |
|
|
|
Hi.
I'm getting a compilation error every time I try to create a called rule
that uses the foreach construct. I'm sort of clueless what's going on...
The error is
INFO: Dumping ASM to C:/eclipse/atl/eclipse/workspace/Teste/problem.asm
INFO: Warning, could not find mathing node for ForEachOutPatternElement in
mode calledRuleCreate
INFO: Warning, could not find mathing node for ForEachOutPatternElement in
mode calledRuleInit
SEVERE: null
java.lang.NullPointerException
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.evalSOTSBr ackets(ASMString.java:346)
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
I tried to reduce the fragment to the smallest possible, so I can only
imagine that the foreach is not supported on called rules. here is my
piece of code - it doesn't make much sense now that I stripped from the
big program.
rule createNodes(uc: UML!OpaqueAction){
using {
coll : Sequence(String) = Sequence{'a', 'b', 'c'};
}
to
cells : distinct UMLOut!ControlFlow foreach(e in coll)(
name<-e
)
}
If I move this to a matched rule, it works fine.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03973 seconds