|
|
|
|
Re: Passing a Type as parameter in acceleo always results in AnyType [message #1843466 is a reply to message #1843464] |
Sat, 31 July 2021 02:16  |
Eclipse User |
|
|
|
Hi
Yeah. That's why we need templates.
The OMG specification states that OCL is UML-aligned, giving a very strong indication that OCL should support templates, but there is zero syntactical support for them. It is hardly surprising that Acceleo/MOFM2T and QVTo that extend OCL also lack template support. Eclipse QVTr has a template extension.
You might just get away with redirecting to OCLinEcore where templates are supported. The syntax was challenging; we all expect <> for templates but this conflicts with arithmetic operators and so requires parsing heroics (see my C++ PhD). OCL through Set(MyClass) already has () for templates so I ended up supporting <> for declarations and () for instantiations.
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.04972 seconds