Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Automatically validate all referenced models
Automatically validate all referenced models [message #899613] Wed, 01 August 2012 10:59 Go to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
Hello,

I have a model which refers on other models and it would be nice if all models, which are referenced get automatically validate if I validate the owner model.

Is there any possibility to do it?
Re: Automatically validate all referenced models [message #899673 is a reply to message #899613] Wed, 01 August 2012 14:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25931
Registered: July 2009
Senior Member
No, you'll need to gather up the things you want to validate. Maybe
just you want to validate all the root objects of all the resources in
the resource set...

On 01/08/2012 4:59 PM, Missing name Mising name wrote:
> Hello,
>
> I have a model which refers on other models and it would be nice if
> all models, which are referenced get automatically validate if I
> validate the owner model.
>
> Is there any possibility to do it?
Re: Automatically validate all referenced models [message #900297 is a reply to message #899613] Mon, 06 August 2012 07:58 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
Thanks. Smile
I think using of an extension point to register all validators would be an acceptable way wouldn't be?
Re: Automatically validate all referenced models [message #900317 is a reply to message #900297] Mon, 06 August 2012 09:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25931
Registered: July 2009
Senior Member
I'm not sure what you're asking. You'll come up with something new on
your own?

On 06/08/2012 1:58 PM, Missing name Mising name wrote:
> Thanks. :)
> I think using of an extension point to register all validators would
> be an acceptable way wouldn't be?
Re: Automatically validate all referenced models [message #900322 is a reply to message #900317] Mon, 06 August 2012 09:34 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
Oh ... I think there is a more easier way, which you described in your book.
In the root model validation method, I iterate through eAllContents and invoke the validation of each element.

Tell me if I am right, please.
Re: Automatically validate all referenced models [message #900338 is a reply to message #900322] Mon, 06 August 2012 10:40 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25931
Registered: July 2009
Senior Member
Diagnostician.INSTANCE.validate already walks all the contained objects
of the root object you validate.

On 06/08/2012 3:34 PM, Missing name Mising name wrote:
> Oh ... I think there is a more easier way, which you described in your
> book.
> In the root model validation method, I iterate through eAllContents
> and invoke the validation of each element.
>
> Tell me if I am right, please.
Previous Topic:[CDO] Collaborative work on UML models
Next Topic:XML Schema and upper/lower bounds
Goto Forum:
  


Current Time: Mon Jul 28 16:46:10 EDT 2014

Powered by FUDForum. Page generated in 0.02340 seconds