Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » org.eclipse.xtext.validation.CheckMode definition
org.eclipse.xtext.validation.CheckMode definition [message #1733923] Thu, 02 June 2016 09:16 Go to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
This line is automatically generated by xtext:
List<Issue> list = validator.validate(resource, CheckMode.ALL, CancelIndicator.NullImpl);


I am planning to change the CheckMode value.
There are several types but the documentation does not specify what each type does.

static CheckMode	ALL 
static CheckMode	EXPENSIVE_ONLY 
static CheckMode	FAST_ONLY 
static CheckMode	NORMAL_AND_FAST 
static CheckMode	NORMAL_ONLY 


I would say that EXPENSIVE means validation will take longer, but what does it cover? What is the difference with EXPENSIVE_ONLY and ALL?
How about NORMAL_ONLY, NORMAL_AND_FAST and FAST_ONLY?

Is there a document that states what each mode checks for?


Re: org.eclipse.xtext.validation.CheckMode definition [message #1733924 is a reply to message #1733923] Thu, 02 June 2016 09:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
You can give your @Check(CheckType.FAST|NORMAL|EXPENSIVE) annotation.
The check mode says which to pick


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: org.eclipse.xtext.validation.CheckMode definition [message #1734289 is a reply to message #1733924] Mon, 06 June 2016 19:25 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
FAST: Triggered by the reconciler, i.e. when you stop typing in the editor for 200ms. These checks should execute fast. This is the default.
NORMAL: Triggered by the builder, i.e. on save. These checks are allowed to take a little longer without damaging the user experience to much.
EXPENSIVE: Only when the user explicitly triggers a validation action in the menu. Usually that is for tests that take so long that it would disturb the user too much when triggered automatically.

Every mode includes its predecessors, except for the XXX_only modes.


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Unit Test for XAnnotation validation shows unresolved reference
Next Topic:Latest Xtext version: 2.9.2 or 2.10.0
Goto Forum:
  


Current Time: Thu Apr 25 15:13:13 GMT 2024

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

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

Back to the top