Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Execution order of different Validators
Execution order of different Validators [message #1770542] Mon, 14 August 2017 04:12 Go to next message
Eclipse UserFriend
Hey guys,

we are running into the following issue currently:

We have several Validators which are used by the "basic" Validator of our DSL.
The validators are registered via @ComposedChecks annotation.

One validator (let's call it ResolverValidator later) does the type-resolving of the statements in our DSL.

Here is a little example to show what this validator does:


VAR_LIST
      someVariable : INT;
END_VAR_LIST

someVariable = 3;



When the ResolverValidator reaches the statement "someVarialbe = 3;", it stores the type for the whole statement, which is INT.

Of course this is done for all the files in a project.

Other validators then need the results of the ResolverValidator.

Now we come to our problem:
It is not ensured, that the ResolverValidator is processed BEFORE all the other validators.

So it can happen, that the other validators are called, and the statements are not resolved yet.


Is there a way to tell Xtext some "execution order" of the validators, or something like this?



Thank you very much for your help!












Re: Execution order of different Validators [message #1770550 is a reply to message #1770542] Mon, 14 August 2017 05:26 Go to previous messageGo to next message
Eclipse UserFriend
The approach itself is bogus, the validator must not depend on derived state. Use an IDerivedStateComputer and proper resource implementation for that.
Re: Execution order of different Validators [message #1770553 is a reply to message #1770550] Mon, 14 August 2017 05:48 Go to previous message
Eclipse UserFriend
Thanks for your fast answer.
This sounds good. We will try to change this, when we have the time for it...
Previous Topic:new project with Oxygen and xtext 2.12
Next Topic:Xbase.genmodel is unmapped while running .mwe2 workflow
Goto Forum:
  


Current Time: Thu Nov 06 19:32:24 EST 2025

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

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

Back to the top