Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to check Custom Validation Errors(How to check Custom Validation Errors)
icon5.gif  How to check Custom Validation Errors [message #1386062] Fri, 13 June 2014 09:56 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi all,
Is there a way to get the number of custom validation errors added?

Resource.getErrors() gives me only dsl related errors.

I even don't want the count, I just want to check whether the editor/resource has errors (can be dsl error or custom validation error).

Any suggestions?

Regards,
Arshad


Arshad
Re: How to check Custom Validation Errors [message #1386069 is a reply to message #1386062] Fri, 13 June 2014 10:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13313
Registered: July 2009
Senior Member
Asking the resource for errors doesnt work? what is missing

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 13 June 2014 10:32]

Report message to a moderator

Re: How to check Custom Validation Errors [message #1386076 is a reply to message #1386069] Fri, 13 June 2014 10:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13313
Registered: July 2009
Senior Member
p.s: if you want to call the validator: Diagnostic diagnostic = Diagnostician.INSTANCE.validate(resource.getContents().get(0));

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to check Custom Validation Errors [message #1386083 is a reply to message #1386076] Fri, 13 June 2014 11:25 Go to previous messageGo to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
HI Christian,
First of all thanks for your reply.
Resource.getErrors() only giving me if there is some mistake in language (i.e. not according to the grammar) but its not giving any info for custom validations.


Regards,
Arshad


Arshad
Re: How to check Custom Validation Errors [message #1386102 is a reply to message #1386083] Fri, 13 June 2014 12:35 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13313
Registered: July 2009
Senior Member
so what about calling the validator manually

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Xtext internal error : error(10)
Next Topic:Integration of DSL into Eclipse
Goto Forum:
  


Current Time: Fri Jan 17 22:46:12 GMT 2020

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

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

Back to the top