Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Debugging model post processing
Debugging model post processing [message #769039] Wed, 21 December 2011 09:43 Go to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

I'm trying to learn about Xtext model post-processing as mentioned here.

I found an old post about using log4j integration on Xtext (http://www.eclipse.org/forums/index.php/m/26468/?srch=logging#msg_26468).

Is there any way to send a log message from the Xtext post processor? I tried to import log4j with no success.

FIY, I'm working on a Xtext 1.0.2 project.

Thank you.
Re: Debugging model post processing [message #769101 is a reply to message #769039] Wed, 21 December 2011 12:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

adding org.eclipse.xtend.util.stdlib as dep and logging like
extension org::eclipse::xtend::util::stdlib::io; 

process(xtext::GeneratedMetamodel this) :
  error("Here we go")
;

works for me

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Debugging model post processing [message #769166 is a reply to message #769101] Wed, 21 December 2011 14:09 Go to previous messageGo to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

Didn't worked. It says:
Error while importing extension: File org::eclipse::xtend::util::stdlib::io
not found.


Is there any dependency I should add to the plugin?

[Updated on: Wed, 21 December 2011 14:09]

Report message to a moderator

Re: Debugging model post processing [message #769171 is a reply to message #769166] Wed, 21 December 2011 14:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Quote:
adding org.eclipse.xtend.util.stdlib as dep


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Debugging model post processing [message #769186 is a reply to message #769171] Wed, 21 December 2011 14:39 Go to previous messageGo to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

The problem is that this plugin is not installed and there is not any Xtend available from Xtext update site.
Re: Debugging model post processing [message #769189 is a reply to message #769186] Wed, 21 December 2011 14:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

it is part of xpand Wink

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Debugging model post processing [message #769190 is a reply to message #769186] Wed, 21 December 2011 14:42 Go to previous messageGo to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

Is this package only available at Indigo release?
Re: Debugging model post processing [message #769193 is a reply to message #769190] Wed, 21 December 2011 14:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
no it is part of helios too

-> Helios -> Modeling -> Xpand SDK

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Debugging model post processing [message #769195 is a reply to message #769193] Wed, 21 December 2011 14:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
btw it was even part of oAW 4.3.1 (under a different namespace) in Ganymede

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 21 December 2011 14:52]

Report message to a moderator

Re: Debugging model post processing [message #769266 is a reply to message #769195] Wed, 21 December 2011 17:14 Go to previous messageGo to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

Thank you Christian. Where can I see the error messages?

I tried to look at the "Error Log", "Problems" and "Console" views. I looked at the Eclipse instance that I'm using to edit the code, and also looked at the Eclipse instance that opens when I run the Xtext project as an Eclipse Application.
Re: Debugging model post processing [message #769268 is a reply to message #769266] Wed, 21 December 2011 17:18 Go to previous messageGo to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

Should I create a log4j.properties file as stated in this document (http://wiki.eclipse.org/Xtext_Project_Plan/Features/Logging)?
Re: Debugging model post processing [message #769343 is a reply to message #769268] Wed, 21 December 2011 20:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi you run the GenerateMydsl workflow and see the logs amoung the
others in the console

ps: we are talking about metamodel postprocessing. this is changing the ecore that is inferred by xtext so are you sure that is thing you want to do?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 21 December 2011 22:38]

Report message to a moderator

Re: Debugging model post processing [message #769822 is a reply to message #769343] Thu, 22 December 2011 18:30 Go to previous messageGo to next message
Reinaldo Junior is currently offline Reinaldo JuniorFriend
Messages: 36
Registered: March 2011
Member

I was thinking this post processing could change the model instance generated by the parser. My goal is adding "default behaviour" to the DSL without using a model transformation.

Any tip?
Re: Debugging model post processing [message #769833 is a reply to message #769822] Thu, 22 December 2011 19:01 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
as i said - one would shift this default behaviour to the metamodel e.g. by adding eoperations there

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Combining importURI and importedNamespace
Next Topic:Problem with grammar
Goto Forum:
  


Current Time: Thu Apr 25 08:08:55 GMT 2024

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

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

Back to the top