Modularizing an Acceleo transformation [message #729927] |
Tue, 27 September 2011 05:45  |
Eclipse User |
|
|
|
Hi
My transformation is sufficiently large that I want to partition a
number of getXXX queries into separate modules so that they can be
invoked by a hierarchical name such as XXX::getA(), YYY::getB() etc,
rather than a lexical XXX_getA(), YYY_getB().
MOFM2T appears to support this through the use of PathNameCS in the
grammar but:
[module XXX::YYY ...
is not permitted by Acceleo. Reports that module must be defined in its
own file.
[import XXX::YYY
is not permitted by Acceleo. Reports that XXX::YYY cannot be found.
Surely XXX::YYY should be resolved relative to the transformation
module? Instead Acceleo seems to find any *.mtl file in the project
regardless of its folder path, which is a tenable implementation if
qualified names are supported on the module declaration, but it would
seem better to impose the constraint that file hierarchy and module
hierarchy align.i.e [module A::B::C ...] must be in .../A/B/C.mtl and
subsequent imports resolve with respect to .../, possibly extended by a
module path of additional roots.
XXX::YYY() invocation
of course fails with an unknown type since the module/import do not
support the declaration of the path scopes.
Is there any way to use hierarchical names in Acceleo?
Regards
Ed Willink
|
|
|
|
|
|
Re: Modularizing an Acceleo transformation [message #730875 is a reply to message #730793] |
Thu, 29 September 2011 08:24  |
Eclipse User |
|
|
|
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359411
On 29/09/2011 08:40, Laurent Goubet wrote:
> Ed,
>
> The unqualified form for imports is a legacy of the first versions of
> Acceleo 3... we kept it in when we added the qualified form in order
> not to break existing modules. However warning the users that this is
> not the recommended form is probably something we should do. Could you
> raise a bug to track this?
>
> As for a "concrete syntax" reference for the Acceleo language, yes,
> that too would be interesting to have... as would an up-to-date,
> typo-free documentation in general :s.
>
> Laurent Goubet
> Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.29728 seconds