Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [SOLVED][EGL] Problem with using XML formatter
[SOLVED][EGL] Problem with using XML formatter [message #1200485] Thu, 21 November 2013 09:06 Go to next message
Piotr Rygielski is currently offline Piotr RygielskiFriend
Messages: 12
Registered: May 2013
Junior Member
Hi Community!

I am writing currently a transformation that outputs xml files. The output files are rather big and it would be nice to have the code formatted in some nice way.

I tried to follow the example from epsilon book - I have the following code in my .egl file:

var t1 = TemplateFactory.load("dni2qpme.egl");
t1.populate("doc", QPME!QpmeDocument.all.at(0));
//var formatter = new Native("org.eclipse.epsilon.egl.formatter.language.XmlFormatter");
//t1.setFormatter(formatter);
t1.process();
t1.generate('generated-network.xml');


When I uncomment the two lines related to formatter, the following error appears:
EXCEPTION: Type 'org.eclipse.epsilon.egl.formatter.language.XmlFormatter' not found


I run the project through an Ant workflow. It looks like this:


	
<project default="main">

 	<target name="loadMetaModels">
 		<epsilon.emf.register file="..."/>
                //many other similar lines
 	</target>
	<target name="loadModels">
 		
		<epsilon.emf.loadModel name="DNI"
                                       modelFile="network4.model"
                                       metamodelUri="some_uri"
                                       read="false" store="true"/>
 		 		
 		<epsilon.emf.loadModel name="QPME"
                                       modelFile="qpme_out.model" 
 				       metamodelUri="some_uri" 
 				       read="false" store="true"/>
		
 	</target>
	<target name="main" depends="loadMetaModels, loadModels">
		<epsilon.eol src="model4-qpn.eol">
			<model ref="DNI"/>
		</epsilon.eol>

		<epsilon.etl src="DNI2qpn.etl">
			<model ref="QPME"/>
			<model ref="DNI"/>
		</epsilon.etl>
	</target>
	
	<target name="m2t" depends="main">
		<epsilon.egl src="driver.egl">
			<model ref="QPME"/>
		</epsilon.egl>
	</target>
</project>


Any idea how to get the formatter working? I suppose, I need to install some additional jars or just point the path to them, but I thought that this functionality is built-in.

[Updated on: Fri, 22 November 2013 13:16]

Report message to a moderator

Re: [EGL] Problem with using XML formatter [message #1200745 is a reply to message #1200485] Thu, 21 November 2013 11:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Piotr,

Are you running your ANT workflow from within Eclipse or from the command line?

Cheers,
Dimitris
Re: [EGL] Problem with using XML formatter [message #1200762 is a reply to message #1200745] Thu, 21 November 2013 11:51 Go to previous messageGo to next message
Piotr Rygielski is currently offline Piotr RygielskiFriend
Messages: 12
Registered: May 2013
Junior Member
I run it from Eclipse.
Re: [EGL] Problem with using XML formatter [message #1201751 is a reply to message #1200762] Thu, 21 November 2013 22:27 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Piotr,

I'm afraid that this appears to be a regression in the latest version of Epsilon. I was able to determine the cause and apply a fix fairly quickly, and I have started a discussion with the other developers to see whether we can build and release a new interim version for you that include this fix. Hopefully I will be able to do this tomorrow, so please stay tuned!

In the meantime, I've opened the following bug to cover the issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=422295

Cheers,
Louis.
Re: [EGL] Problem with using XML formatter [message #1202850 is a reply to message #1201751] Fri, 22 November 2013 10:53 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Piotr,

We've rolled out a new interim release this morning which includes the patch for this issue. Please update to this version and let me know if it resolves your problem.

The Eclipse update site is: http://download.eclipse.org/epsilon/interim/

Cheers,
Louis.
Re: [EGL] Problem with using XML formatter [message #1203075 is a reply to message #1202850] Fri, 22 November 2013 13:13 Go to previous message
Piotr Rygielski is currently offline Piotr RygielskiFriend
Messages: 12
Registered: May 2013
Junior Member
Hi Louis, after this update it works perfectly! Thank you for fixing this so quickly, this will boost my work Smile
Previous Topic:ecl ant task doesn't "see" inherited elements from a metamodel
Next Topic:Running ANT tasks from bash console
Goto Forum:
  


Current Time: Fri Apr 26 12:28:18 GMT 2024

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

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

Back to the top