Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Filename based on result of EOperation([Acceleo] Filename based on result of EOperation)
[Acceleo] Filename based on result of EOperation [message #1781429] Wed, 07 February 2018 09:44
Bruce Trask is currently offline Bruce TraskFriend
Messages: 20
Registered: July 2009
Junior Member
I would like to generate a file whose name depends on the result of a called EOperation which returns a string.

So instead of doing this:

[file ('APPLICATION.'.concat(application.name), false, 'UTF-8')]
contents
[/file]

which works fine.

I would like to do this where getPropertyFileName is an EOperation I have added to the application model element.

[file ('APPLICATION.'.concat(application.getPropertyFileName()), false, 'UTF-8')]
contents
[/file]

But I get an error from Acceleo:
org.eclipse.acceleo.engine.AcceleoEvaluationException: Couldn't evaluate URL of the file at line 310 in Module generate for block file('APPLICATION.'.concat(application.getPropertyFileName()), false, 'UTF-8'). Last recorded value of self was mymodel.impl.ApplicationImpl@3c77d488 (name: MyApp).

Not sure what the error message is doing to help me here?

Does the Acceleo file creation support the calling of an EOperation? It shows up as valid when I do ctrl-space.

Regards,
Bruce




[Updated on: Wed, 07 February 2018 09:45]

Report message to a moderator

Previous Topic:[Acceleo] How to access elements in for loop OR use a java service for that?
Goto Forum:
  


Current Time: Tue Feb 20 00:17:00 GMT 2018

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

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