Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » escape chrachter in Xpand
escape chrachter in Xpand [message #975264] Wed, 07 November 2012 13:49 Go to next message
Eclipse UserFriend
Hello all ,

I want to generate Xpand template using Xpand itself. I have to escape all the Xpand keywords .
Is there any escape character for Xpand?or any alternative way to do that?

thanks in Advance .
Re: escape chrachter in Xpand [message #975416 is a reply to message #975264] Wed, 07 November 2012 16:28 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

something like

«FILE "test.xpt"»
«"«DEFINE test FOR Model»"»
«"«ENDDEFINE»"»
«ENDFILE»


doesnt work?
Re: escape chrachter in Xpand [message #975998 is a reply to message #975416] Thu, 08 November 2012 03:31 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian

Thank you for reply , I tried your solution , but the generated file did not recognize
french guillemets « » the result was like this .
�IMPORT Usecase�


�EXPAND autoname FOREACH name�
�DEFINE autoname FOR name�

any sugestions please?


thank you very much
Re: escape chrachter in Xpand [message #976298 is a reply to message #975264] Thu, 08 November 2012 08:22 Go to previous messageGo to next message
Eclipse UserFriend
This is an encoding issue. Set the output encoding to the one used for your templates. Consider to set the resource encoding for your project to project specific setting. Usual values for encoding are UTF-8 or ISO-8859-1.

	<component class="org.eclipse.xpand2.Generator">
...
		<outlet path="${src-gen}" fileEncoding="UTF-8">
			<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
		</outlet>
	</component>


Regards,
~Karsten
Re: escape chrachter in Xpand [message #976413 is a reply to message #976298] Thu, 08 November 2012 10:07 Go to previous message
Eclipse UserFriend
Thanks Karsten ,
now it works fine .
Previous Topic:From OWL 2 metamodel to any abstract syntax
Next Topic:[Acceleo] Problem invoke java service
Goto Forum:
  


Current Time: Tue Jul 15 14:23:52 EDT 2025

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

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

Back to the top