Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL write to file
ATL write to file [message #1001783] Thu, 17 January 2013 11:15 Go to next message
Basma Moukhtar is currently offline Basma Moukhtar
Messages: 27
Registered: June 2010
Junior Member

Dears,

I try to write some strings in a sequence to a file.

I use the "writeTo" method as follows:
mySequence->collect(x | x.toString().writeTo('path'));

But this writes the last string only, so it overwrites what's in the file, I need to append.
So, what method shall I use?
Re: ATL write to file [message #1001887 is a reply to message #1001783] Thu, 17 January 2013 14:10 Go to previous message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
Hello,

You first have to build the full string you want to obtain, and then finally make a call to the writeTo method.
This latter does not provide concatenation support and simply overrides the current content of the file if existing.

Best regards,

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Previous Topic:calling java in a query
Next Topic:The class 'VisitableCS' is not a valid classifier
Goto Forum:
  


Current Time: Sat Oct 25 12:44:26 GMT 2014

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

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