|
Re: [Acceleo] dynamic vs generated package used by Acceleo Plug-in Application [message #757696 is a reply to message #757609] |
Mon, 21 November 2011 09:39 |
|
Vlad,
The metamodel URI you use in your module declaration should always be the metamodel's NsURI, no relative or platform:/... URI (in the line "module myModule('<myPackageNsURI>')").
Is that your case? If yes, could you open the ".emtl" file corresponding to your module and tell us what URI is used there? Should be at the very top of the file, with lines looking as such :
<input>
<takesTypesFrom href="myPackageNsURI#/"/>
</input>
Laurent Goubet
Obeo
|
|
|
Re: [Acceleo] dynamic vs generated package used by Acceleo Plug-in Application [message #757874 is a reply to message #757609] |
Sun, 20 November 2011 12:38 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi Vlad
EMF does not initialize its standalone support for platform:/resource,
platform:/plugin; you must activate it yourself.
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=361063)
Acceleo 3.0, 3.1, 3.2 are differently broken for URIs of the form
.../../.... which EMF creates at Acceleo edit-time as platform:/resource
relative. Acceleo establishes a resolution base heuristically at
run-time so that ../../.... may sometimes resolve in your file system
layout. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=360926)
You have three choices:
a) get lucky with Acceleo 3.x's current algorithms
b) use only generated package URIs such as http:/...
c) use some nasty workarounds to make platform: and friends work (see
org.eclipse.ocl.examples.codegen)
b) is simple and predictable; just make sure there are no
platform:/resource, platform:/plugin, ../../.... URIs anywhere. Acceleo
should then autogenerate the standalone registrations and you don't need
to edit any Java code.
Regards
Ed Willink
On 20/11/2011 10:39, Vlad Gheorghe wrote:
> Hello,
>
> I have a metamodel MM1 present in a plug-in project in the development
> workspace. The plug-in registers MM1 using the generated_package
> extension point.
>
>
> I also have an Acceleo generator plug-in in the same workspace, which
> takes instances of MM1 as input.
>
> Question:
> How can I control which version of the metamodel MM1, dynamic or
> generated, is used when running the generator as an Acceleo Plug-in
> Application ?
>
> I suspect that this was changed between Acceleo 3.1 and 3.2:
> 3.1 - uses generated pacakage
> 3.2 - uses dynamic package
>
> However, I need to use the generated package always, as MM1 has some
> parts implemented in Java.
>
> Regards,
> Vlad Gheorghe
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03286 seconds