Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [xPand]Problems generating large strings with xPand(Problems generating large strings with xPand)
[xPand]Problems generating large strings with xPand [message #542598] Fri, 25 June 2010 08:01 Go to next message
Ambros Morscher is currently offline Ambros Morscher
Messages: 28
Registered: June 2010
Junior Member
Hi together,

i'm exectuing xPand templates from java code. I get into problems when i try to output large java.lang.Strings(39757953 characters) in the templates. Processor usage climbs up to 100% and generation does not make any progress although enough heap space is available . Is there any option i could set on the XPandExecutionContext to handle this? Or are thre any limitations according to number of characters in a string?
Has anyone an idea where i can put my hands on to solve the problem ?

Thank you for your answers.
Regards Ambros
Re: [xPand]Problems generating large strings with xPand [message #542656 is a reply to message #542598] Fri, 25 June 2010 10:34 Go to previous messageGo to next message
Darius Jockel is currently offline Darius Jockel
Messages: 63
Registered: July 2009
Member
Hello,

it is an option to partionate the file into parts,
and then use the append option of an outlet?

See Xpand documentation:
6.5.4. Output configuration

Regards
Darius
Re: [xPand]Problems generating large strings with xPand [message #543385 is a reply to message #542656] Tue, 29 June 2010 05:31 Go to previous messageGo to next message
Ambros Morscher is currently offline Ambros Morscher
Messages: 28
Registered: June 2010
Junior Member
Hello Darius,

thank you for your answer. Generation know works fine but my JavaFormatter cannot be applied because i splitted the file into two xPand file statements. The formatter is called for any ENDFILE tag. As a result the formatter cannot be applied because templates do not produce legal java code.

Any ideas to fix this?

Regards Ambros
Re: [xPand]Problems generating large strings with xPand [message #543387 is a reply to message #543385] Tue, 29 June 2010 05:34 Go to previous messageGo to next message
Darius Jockel is currently offline Darius Jockel
Messages: 63
Registered: July 2009
Member
Hello,

if you use more than one generator component you could apply the JavaFormatter only to the last generator component.

Regards
Darius
Re: [xPand]Problems generating large strings with xPand [message #543407 is a reply to message #543387] Tue, 29 June 2010 07:06 Go to previous messageGo to next message
Ambros Morscher is currently offline Ambros Morscher
Messages: 28
Registered: June 2010
Junior Member
A formatter is applied to one outlet. It is only formatting the code which is produced by the file statement so a general formatting is not possible.
Re: [xPand]Problems generating large strings with xPand [message #543432 is a reply to message #542598] Tue, 29 June 2010 08:37 Go to previous message
Ambros Morscher is currently offline Ambros Morscher
Messages: 28
Registered: June 2010
Junior Member
Hi again,
i investigated some more time in the problem and it seems that the xPand JavaBeautifier is taking so much time to format the code (39776970 characters) . Has anyone an idea how to fix performance of the JavaBeautifier.

Regards Ambros
Previous Topic:[Acceleo] Using a multiple package source model
Next Topic:xtend code optimization
Goto Forum:
  


Current Time: Thu Aug 28 03:28:59 EDT 2014

Powered by FUDForum. Page generated in 0.08944 seconds