Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Validation in xtext(Clarifications on Validation in xtext)
icon5.gif  Validation in xtext [message #1174947] Thu, 07 November 2013 12:16 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi all,
For my language created from xtext grammar I have written some validation checks/methods. This is fine, it works perfectly for me. But I want something more,

1. When I launch my product(as Eclipse Application ) the validations checks are NOT CALLED. I want all the validation checks to be called when I launch my tool. But it happens only when I edit or do some stuff in my editor.
Problem with this: Last state of the editor is saved when I close my product, and if I write/update the validation checks, these things will not be called when I launch my tool next time and only will be called when I do something in the editor.


2. As soon as I start typing value for a field in the editor, the validation checks are called which results in errors. I don't want it to happen. I want to call the validation when typing is completed.
For e.g. say that I have a enum in my editor (enum_Sample=10) and I will be referring this at some other place. No doubt if I press (Ctrl + Space), I will get the content assist. But if I start typing "enum_Sample", untill its typed completely, for each character it will give me an error.

Thanks in advance for your help !! Smile Smile


Arshad
Re: Validation in xtext [message #1174965 is a reply to message #1174947] Thu, 07 November 2013 12:32 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13496
Registered: July 2009
Senior Member
Hi,

simply calling a project clean ? or do not persit the state?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
icon5.gif  Re: Validation in xtext [message #1176005 is a reply to message #1174965] Fri, 08 November 2013 04:20 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,
But Can I call the validation checks when my tool is launched?
And can you help me with Point No. 2 that I have mentioned above.


Thanks in advance Smile


Arshad
Re: Validation in xtext [message #1176200 is a reply to message #1176005] Fri, 08 November 2013 07:23 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13496
Registered: July 2009
Senior Member
Have no idea on that.

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Validation in xtext [message #1176224 is a reply to message #1176200] Fri, 08 November 2013 07:41 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13496
Registered: July 2009
Senior Member
P.S:

you can change the execution time of checks via
@Check(CheckType.YOUR_CHOICE)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
icon5.gif  Re: Validation in xtext [message #1182381 is a reply to message #1176224] Tue, 12 November 2013 06:31 Go to previous messageGo to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi Chistian,
Thanks for your reply. It helped me. So I can use one among FAST, NORMAL and EXPENSIVE.
FAST and NORMAL are pretty clear to me. Could you please explain me a little about EXPENSIVE. It says "an action, which can be optionally generated for you DSL, explicitely evaluates EXPENSIVE constraints ". But I did not understand properly.


Thanks in advance Smile


Arshad
Re: Validation in xtext [message #1182415 is a reply to message #1182381] Tue, 12 November 2013 07:05 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13496
Registered: July 2009
Senior Member
Rightclick on the Open Editor with the file to validate -> then choose validate (note there a 2 validates - in my case it is the upper one)

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Validation in xtext [message #1182509 is a reply to message #1182381] Tue, 12 November 2013 08:29 Go to previous message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 248
Registered: June 2013
Senior Member
AFAIK, on uses the EXPENSIVE if the validation of some issues takes too long (who wants to wait 20 mins per save?).

So these need a manual invocation, as Dietrich explained.
Previous Topic:How to make the default value of "Literals Interface" to be "true"
Next Topic:Restrict Index (EObjectDescriptions)
Goto Forum:
  


Current Time: Mon Jul 13 19:18:32 GMT 2020

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

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

Back to the top