Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » databinding and EMF Validation
databinding and EMF Validation [message #657570] Thu, 03 March 2011 10:32 Go to next message
Matteo Miraz is currently offline Matteo MirazFriend
Messages: 38
Registered: March 2011
Member
Hi,

I need to create a wizard to create an EMF model and fill its properties. To this end, I leverage JFace to create bidings between SWT elements and EMF properties.

Now, I'm facing with user errors. The model imposes some constraints on the values of its properties, and for this reason, it is able to validate itself (following EMF's guidelines).

I would like to reuse the result of the model validation to detect errors in the user's inputs. Is it possible to do it?

Thank you in advance,
Matteo

[Updated on: Thu, 03 March 2011 10:32]

Report message to a moderator

Re: databinding and EMF Validation [message #658012 is a reply to message #657570] Sat, 05 March 2011 00:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Matteo,

I imagine the answer is yes, but I'm not a data binding expert and no
doubt next you'll ask "how can I do it"?


Matteo wrote:
> Hi,
>
> I need to create a wizard to create an EMF model and fill its
> properties. To this end, I leverage JFace to create bidings between
> SWT elements and EMF properties.
> Now, I'm facing with user inputs. The model imposes some constraints
> on the values of its properties, and for this reason, it is able to
> validate itself (following EMF's guidelines).
>
> I would like to reuse the result of the model validation to detect
> errors in the user's inputs. Is it possible to do it?
> Thank you in advance,
> Matteo


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: databinding and EMF Validation [message #658239 is a reply to message #657570] Mon, 07 March 2011 14:44 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

The problem IIRC with EMF-Validation is works on top of the
Model-Instance to make the validation and so you can use it as an
IValidator because at that moment the model hasn't been synced (that's
exactly the purpose of the validator).

IIRC there've been ideas to implement this by defining a
IValidationStatusProvider on the binding context but I'm not 100% sure
if people made any progress on it.

I personally only use fairly IValidators not really often and prefer to
let the model instance get invalid because this is the only possibility
to implement cross field validation is a proper way and validating the
model before persiting has to be done anyways - no matter if Eclipse
Databinding reported an error or not.

Tom

Am 03.03.11 11:32, schrieb Matteo:
> Hi,
>
> I need to create a wizard to create an EMF model and fill its
> properties. To this end, I leverage JFace to create bidings between SWT
> elements and EMF properties.
> Now, I'm facing with user inputs. The model imposes some constraints on
> the values of its properties, and for this reason, it is able to
> validate itself (following EMF's guidelines).
>
> I would like to reuse the result of the model validation to detect
> errors in the user's inputs. Is it possible to do it?
> Thank you in advance,
> Matteo
Previous Topic:[databinding] How to validate multiple properties cross-referenced
Next Topic:Forward keypress event to cell editor
Goto Forum:
  


Current Time: Thu Apr 25 15:54:17 GMT 2024

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

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

Back to the top