Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How to disable validation when editing in xtext editor?(validator performance)
How to disable validation when editing in xtext editor? [message #1840349] Mon, 12 April 2021 21:01 Go to next message
Eclipse UserFriend
I have implemented a dsl editor based on xtext.

when the code of my dsl are more than 300 lines, the user experience of my xtext editor is getting slower and slower.

The xtext editor was blocked for serveral seconds when the validator was running.

How to disable validation when editing ? And How to enable validation after saving ?

Thanks!
Re: How to disable validation when editing in xtext editor? [message #1840350 is a reply to message #1840349] Tue, 13 April 2021 00:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

first you should profile where the time is spent and if validation is the problem at all.
second you should have a look at your check methods
and mark them with @Check(Check.NORMAL) instead of the default @Check which will be CheckType.FAST and be executed during editing. NORMAL will be executed on save
Re: How to disable validation when editing in xtext editor? [message #1840351 is a reply to message #1840350] Tue, 13 April 2021 01:47 Go to previous messageGo to next message
Eclipse UserFriend
Your advice works!
Thanks a lot!
Re: How to disable validation when editing in xtext editor? [message #1840383 is a reply to message #1840351] Tue, 13 April 2021 11:35 Go to previous message
Eclipse UserFriend
David,

Please read the section "Creating Custom Validation Rules" from the Xtext documentation - https://www.eclipse.org/Xtext/documentation/103_domainmodelnextsteps.html
Previous Topic:Qualified Name ID.ID....KEYWORD
Next Topic:Missing Rule BEGIN in White-space awareness grammar
Goto Forum:
  


Current Time: Mon May 12 16:01:05 EDT 2025

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

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

Back to the top