Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] How to get the TargetFolder from script(I need to get the targetFolder from the language)
[Acceleo] How to get the TargetFolder from script [message #1001230] Wed, 16 January 2013 09:33 Go to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
Hello,

There is any standard variable or command to get the target folder from an Acceleo script?

I'd like to do something like this:

[template private pathToDataFile(aClass : Class)]
[targetFolder/]/[aClass.testDataFileName()/]
[/template]

and then, in the main template


br = new BufferedReader( new FileReader (new File ("[aClass.pathToDataFile()/]")));


If I dont add the target folder to the path, the generated code cannot find the test data file.

Thank you!
Re: [Acceleo] How to get the TargetFolder from script [message #1001709 is a reply to message #1001230] Thu, 17 January 2013 08:57 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

This feature does not exists. You can't retrieve the target folder from the generator unless you create a Java service to do it by keeping in memory the target folder given to your Java launcher.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks
Re: [Acceleo] How to get the TargetFolder from script [message #1002319 is a reply to message #1001709] Fri, 18 January 2013 11:53 Go to previous message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
thank you! I've made it work in that way
Previous Topic:[Acceleo] Accents
Next Topic:Model, XML, XMLSchema, XMI and Model -to-text transformation
Goto Forum:
  


Current Time: Thu Mar 28 14:19:19 GMT 2024

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

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

Back to the top