Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Errors and Warnings while running workflow
Errors and Warnings while running workflow [message #1015876] Mon, 04 March 2013 06:19 Go to next message
Ankit Agarwal is currently offline Ankit Agarwal
Messages: 33
Registered: March 2012
Member
HI,

I have generated an Xtext editor based on my DSL. I am writing some file on my editor and saving it. It has few Errors and warning, that i have put deliberately. When i run the workflow to generate some file from that takes the saved file as input and generates some code from that, i get all those errors and warnings of my saved file on the console. I Only want the errors to be shown , not the warnings. How can this be achieved?
Re: Errors and Warnings while running workflow [message #1016885 is a reply to message #1015876] Fri, 08 March 2013 04:26 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit Agarwal
Messages: 33
Registered: March 2012
Member
I dont know why was this happening. But found a workaround for this.
As i needed to show the errors and warnings only on editor and not on code generation, So i had to set a flag in Editor class that it is being used. Now on validations i put a check that if that flag was true then editor is being used so to show the error, while when running from workflow that flag would be false.
Re: Errors and Warnings while running workflow [message #1016916 is a reply to message #1016885] Fri, 08 March 2013 08:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

let us asume you use org.eclipse.xtext.mwe.Reader to read the model.
then you can see that the reader has
a org.eclipse.xtext.mwe.Validator
that about customize this Validator

(e.g. overide validate)
Re: Errors and Warnings while running workflow [message #1016944 is a reply to message #1016916] Fri, 08 March 2013 09:48 Go to previous message
Ankit Agarwal is currently offline Ankit Agarwal
Messages: 33
Registered: March 2012
Member
Thanks for the clue Christian...This seems a genuine solution. I will try it out...
Previous Topic:Couldn't resolve reference to Type
Next Topic:Question on cross-referencing and scoping
Goto Forum:
  


Current Time: Sat Oct 25 13:42:43 GMT 2014

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

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