Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] generating code to socket stream not to file in secondary storage
[Xpand] generating code to socket stream not to file in secondary storage [message #1221563] Wed, 18 December 2013 00:53 Go to next message
Adnan AL-SOSWA is currently offline Adnan AL-SOSWAFriend
Messages: 41
Registered: May 2010
Member
Hi all ,

I am wondering if it is possible to generate code with xpand to socketstream not to file on secondry storage?
I want to the generated text to be stored in java string variable and then I will use it as parameter to my socket stream ?


Thank you in advance.
Re: [Xpand] generating code to socket stream not to file in secondary storage [message #1221655 is a reply to message #1221563] Wed, 18 December 2013 07:09 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 748
Registered: July 2009
Location: Dortmund, Germany
Senior Member

A bit out of scope, but basically this will be possible with some effort. The actual place where the file is written is FileHandleImpl#writeAndClose. You need to exchange FileHandleImpl by your own implementation of FileHandle. The creation of FileHandles is done by Outlet#createFileHandle, which would mean you need your own implementation of Outlet, usually by subclassing and overriding this method. Outlets are created by the Generator component, so this needs subclassing also.

Regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:Jet2 Build bad Directive taglib
Next Topic:[Acceleo] Heap Space Problems during Generation
Goto Forum:
  


Current Time: Sun Oct 17 17:23:46 GMT 2021

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

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

Back to the top