Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] generating input filename
[Acceleo] generating input filename [message #903519] Fri, 24 August 2012 06:11 Go to next message
Wilbert Alberts is currently offline Wilbert Alberts
Messages: 94
Registered: June 2010
Member
Hi,

I'd like to generate the source filename in my output. So given an EObject e, I'd like to be able to have something like this in my template:

[e.eResource().getURI()/]

However, getURI is not recognized.

Any ideas?

Greetings,
Wilbert.
Re: [Acceleo] generating input filename [message #903526 is a reply to message #903519] Fri, 24 August 2012 06:52 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

Unfortunately EResource is modelled in Ecore.ecore as an EDataType
rather than an EClass so it has no modelled operations, although in some
cases Acceleo does follow the Java class instantiation. You could raise
this as an Acceleo bug/enhancement.

So you need to invoke a Java helper.

Regards

Ed Willink


On 24/08/2012 07:11, Wilbert Alberts wrote:
> Hi,
>
> I'd like to generate the source filename in my output. So given an
> EObject e, I'd like to be able to have something like this in my
> template:
>
> [e.eResource().getURI()/]
>
> However, getURI is not recognized.
>
> Any ideas?
>
> Greetings,
> Wilbert.
>
Previous Topic:[acceleo] standalone, no emtl found
Next Topic:[Xpand] Out of memory when generating large files with Xpand
Goto Forum:
  


Current Time: Tue Sep 23 18:29:06 GMT 2014

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

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