Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Validation
EMF Validation [message #834804] Mon, 02 April 2012 12:21 Go to next message
El Shorty is currently offline El ShortyFriend
Messages: 37
Registered: March 2012
Member
Hey,

just a small question, I have an EMF/RCP application with different editors. One of those is to edit groups/persons and has a few textboxes, the input from these goes straight into my modelobjects f.e. email from a person. So now I need to validate that the given email is in fact an emailadress.

I've read a bit about EMF Validation Framework (don't fully understand it yet, but getting there, any good tutorials are always welcome) and I'm wondering if that is the way to go. Or would be easier to just "manually" check the input from the user using simple java code.

Any ideas?
Re: EMF Validation [message #834837 is a reply to message #834804] Mon, 02 April 2012 13:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It depends what you are comfortable with and what you really want.

If you like writing Java, write Java, but you should consider Xcore
since it will encapsulate everything nicely.

If you just want to validate when you want to, there is no need to use
the EMF Validation framework, you can use Diagnostician.validate
directly. EMFv is useful for cleverer batch or incremental validations.

Some EMFv also has some very dated descriptions on using OCL for
validation. I will probably produce a significantly updated Eclipse
Corner article during the Juno RC quiet period.

If you want to use OCL to specify (as well as implement), you will again
find it easier to use Diagnostician.validate directly. Use the
OCLinEcore editor to encapsulate and check the OCL for you.

Regards

Ed Willink


On 02/04/2012 13:21, El Shorty wrote:
> Hey,
>
> just a small question, I have an EMF/RCP application with different
> editors. One of those is to edit groups/persons and has a few
> textboxes, the input from these goes straight into my modelobjects
> f.e. email from a person. So now I need to validate that the given
> email is in fact an emailadress.
> I've read a bit about EMF Validation Framework (don't fully understand
> it yet, but getting there, any good tutorials are always welcome) and
> I'm wondering if that is the way to go. Or would be easier to just
> "manually" check the input from the user using simple java code.
>
> Any ideas?
Re: EMF Validation [message #834988 is a reply to message #834837] Mon, 02 April 2012 16:47 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
[jface/emf] databinding is an alternative if you just need to validate at UI level...
Re: EMF Validation [message #835399 is a reply to message #834988] Tue, 03 April 2012 06:49 Go to previous message
El Shorty is currently offline El ShortyFriend
Messages: 37
Registered: March 2012
Member
Thanks for the replies. I'll look into them Very Happy
Previous Topic:[EMF][Teneo][Transaction] what's the best way to combine them...
Next Topic:EMF Annotations
Goto Forum:
  


Current Time: Sat Apr 27 00:22:48 GMT 2024

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

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

Back to the top