Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Import a meta-model using its path
[Acceleo] Import a meta-model using its path [message #532199] Fri, 07 May 2010 13:56 Go to next message
labassim  is currently offline labassim Friend
Messages: 6
Registered: May 2010
Junior Member
Hi,
I am writing an "mtl" generation template using a meta-model defined by a local Ecore file.
I would like to access the Ecore file by its path (since it's not registered in the NSUri), and I tried the following syntax :
...
[module generateEditor('/myproject/model/mymetamodel.ecore')/]
...
but it doesn't work (Acceleo can't find the metamodel).
Is Acceleo able to handle meta-models which are not registered in the NSUri ?
If that's not the case, how can I register a meta-model in the NSUri without launching a second Eclipse ?
PS : I am using the Acceleo 8.1 build.
Thanks in advance.
Re: [Acceleo] Import a meta-model using its path [message #533078 is a reply to message #532199] Wed, 12 May 2010 07:59 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030803090006010607000609
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Mehdi,

You should be able to use the NsURI of your ecore model directly, even
if it is within your workspace. Support of workspace metamodels has been
added to 3.0M5 though, so neither option (NsURI or path) will work with
a previous version (such as the 0.8.1 your using).

You either have to upgrade to Acceleo 3.0M7 or launch a runtime eclipse
as you suggest in the end of your mail.

Laurent Goubet
Obeo

labassim wrote:
> Hi,
> I am writing an "mtl" generation template using a meta-model defined by
> a local Ecore file.
> I would like to access the Ecore file by its path (since it's not
> registered in the NSUri), and I tried the following syntax :
> ..
> [module generateEditor('/myproject/model/mymetamodel.ecore')/]
> ..
> but it doesn't work (Acceleo can't find the metamodel).
> Is Acceleo able to handle meta-models which are not registered in the
> NSUri ?
> If that's not the case, how can I register a meta-model in the NSUri
> without launching a second Eclipse ?
> PS : I am using the Acceleo 8.1 build.
> Thanks in advance.


--------------030803090006010607000609
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------030803090006010607000609--
Previous Topic:[Xpand Documentation] Mistake in multiple dispatch example?
Next Topic:[Acceleo] Accessing external variables from templates
Goto Forum:
  


Current Time: Fri Apr 19 22:16:33 GMT 2024

Powered by FUDForum. Page generated in 0.02909 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top