Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Programmatic Validation
Programmatic Validation [message #418036] Thu, 03 April 2008 01:27 Go to next message
Eclipse UserFriend
Originally posted by: derrydavis.hotmail.com

Hi All,
Checking in for some guidance. I have a requirement of validating all of
the data in a single model instance prior to saving the serialized
instance of the data. Does it make sense to use the 'validateDocumentRoot'
method of the validator class or is there a different recommendation?
If this is recommended, are there examples of this approach? I'm having
some difficulty setting the arguments into the method and would like to
understand the DiagnosticChain and Map arguments better. I believe I can
get the document root from the edit domains resource set. Advice is
appreciated, thanks in advance.
-derry
Re: Programmatic Validation [message #418040 is a reply to message #418036] Thu, 03 April 2008 11:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Derry,

Normally you'd just use Diagnostician.INSTANCE.validate, though you
might want to specialize it to use the label providers of your editor
the way it's done in ValidateAction.validate.


Derry wrote:
> Hi All,
> Checking in for some guidance. I have a requirement of validating all
> of the data in a single model instance prior to saving the serialized
> instance of the data. Does it make sense to use the
> 'validateDocumentRoot' method of the validator class or is there a
> different recommendation?
> If this is recommended, are there examples of this approach? I'm
> having some difficulty setting the arguments into the method and would
> like to understand the DiagnosticChain and Map arguments better. I
> believe I can get the document root from the edit domains resource
> set. Advice is appreciated, thanks in advance.
> -derry
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Programmatic Validation [message #418208 is a reply to message #418040] Fri, 04 April 2008 21:59 Go to previous message
Eclipse UserFriend
Originally posted by: derrydavis.hotmail.com

Ed Merks wrote:

> Derry,

> Normally you'd just use Diagnostician.INSTANCE.validate, though you
> might want to specialize it to use the label providers of your editor
> the way it's done in ValidateAction.validate.


That worked perfectly without any specialization. Thanks Ed!
-derry
Previous Topic:Not able to set EType in EMF 2.4.0.v200803181800
Next Topic:Manifest.mf Generation Failure
Goto Forum:
  


Current Time: Sat Apr 27 02:08:21 GMT 2024

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

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

Back to the top