Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generate error/warning markers from EValidator
Generate error/warning markers from EValidator [message #721811] Sat, 03 September 2011 00:31 Go to next message
Mirko Raner is currently offline Mirko RanerFriend
Messages: 125
Registered: July 2009
Location: New York City, NY
Senior Member
Hi all,

we are dealing with a bunch of interconnected Xtext-languages and Ecore models.
For one of these models, we'd like to issue warnings when we detect certain problems with the file that contains the model data. The model does not have a generated validator, so we created a custom EObjectValidator subclass and entered it into the EValidator.Registry (in the bundle activator). When we programmatically invoke a Diagnostician everything seems to work fine. However, we would like to have the validation run automatically when the resource is loaded. Also, we would like to have error/warning markers created and have the problems also show up on the problems tab of the Reflective Sample Ecore editor.
Other than registering the Validator in the EValidator.Registry, what steps are we missing?

Mirko
Re: Generate error/warning markers from EValidator [message #721829 is a reply to message #721811] Sat, 03 September 2011 02:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Mirko,

Comments below.

On 02/09/2011 5:31 PM, Mirko Raner wrote:
> Hi all,
>
> we are dealing with a bunch of interconnected Xtext-languages and
> Ecore models.
> For one of these models, we'd like to issue warnings when we detect
> certain problems with the file that contains the model data. The model
> does not have a generated validator, so we created a custom
> EObjectValidator subclass and entered it into the EValidator.Registry
> (in the bundle activator).
Trying to do manually what would be generated for you if you declared
constraints...
> When we programmatically invoke a Diagnostician everything seems to
> work fine. However, we would like to have the validation run
> automatically when the resource is loaded.
In the generated editors, there's only a validate action that users have
to invoke explicitly...
> Also, we would like to have error/warning markers created and have the
> problems also show up on the problems tab of the Reflective Sample
> Ecore editor.
The reflective editor doesn't automatically invoke the validator either.
> Other than registering the Validator in the EValidator.Registry, what
> steps are we missing?
You're just expecting the context menu's Validate... action to be
invoked automatically, but it's not...
>
> Mirko
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF editors keeps showing stale data and there's a danger of losing edits!
Next Topic:Where to download EMF ODA builds
Goto Forum:
  


Current Time: Thu Apr 25 23:17:10 GMT 2024

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

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

Back to the top