Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Neebee question: XMLBeautifier(XMLBeautifier whithout effect)
icon5.gif  Neebee question: XMLBeautifier [message #508456] Mon, 18 January 2010 23:14 Go to next message
No real name is currently offline No real nameFriend
Messages: 7
Registered: January 2010
Junior Member
Hey,

I tried to use the pretty printer for my xml files. I read the doku but I did not get it
working. After I added two missing packages to the classpath I do not get
any errormessages:

One test was:

<component class="org.eclipse.xpand2.Generator">
<metaModel class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel "/>
<fileEncoding value="UTF-8"/>
<expand value="templates::Test::main FOR model"/>
<outlet path="${targetDir}" >
<postprocessor class="org.eclipse.xpand2.output.XmlBeautifier" />
</outlet>
</component>

But I does not have any effect! Must the file name end with xml? I tried both but it does not matter. I got no effect. What did I wrong?

Thank you!
Re: Neebee question: XMLBeautifier [message #509681 is a reply to message #508456] Sun, 24 January 2010 17:32 Go to previous messageGo to next message
Joerg Reichert is currently offline Joerg ReichertFriend
Messages: 80
Registered: July 2009
Location: Leipzig
Member
Hi No Real Name,

I filled in a bug as I encountered this problem too. You may also add your XML that is not formatted. Maybe the XmlBeautifier has a problem with a certain structure in our XMLs. While this bug is not fixed yet you may use the org.eclipse.xtend.typesystem.xsd.XMLBeautifier as your beautifier. In order to use it you have to add the org.eclipse.xtend.typesystem.xsd to your plugin dependencies.

Cheers,
Joerg


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Re: Neebee question: XMLBeautifier [message #509685 is a reply to message #509681] Sun, 24 January 2010 18:15 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 7
Registered: January 2010
Junior Member
Yes, thank you. I did this already and it works Smile!
Re: Neebee question: XMLBeautifier [message #512082 is a reply to message #509685] Wed, 03 February 2010 20:42 Go to previous message
Patrik Nordwall is currently offline Patrik NordwallFriend
Messages: 2
Registered: July 2009
Junior Member
I had the same problem and tried org.eclipse.xtend.typesystem.xsd.XMLBeautifier. It works, but it is so slow that it is not possible to use. Maybe I'm doing something wrong. No cpu usage, but a lot of network usage while beutifying.

I will continue and use this instead:
<beautifier class="org.fornax.utilities.formatter.xml.XmlFormatter"/>

<dependency>
<groupId>org.fornax.utilities</groupId>
<artifactId>fornax-utilities-formatter-xml</artifactId>
<version>2.0.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>

/Patrik
Previous Topic:problem with multiple template files
Next Topic:How to debug java extensions?
Goto Forum:
  


Current Time: Mon Oct 14 02:34:05 GMT 2024

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

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

Back to the top