Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » model validation
model validation [message #54502] Mon, 28 April 2008 15:38 Go to next message
Eclipse UserFriend
Originally posted by: hannes-n.gmx.de

Hello,

The actual project I'm working on has a need for a model-editor, and we
decided to use the model-generator of emf, because we're working with emf
anyway.

Moreover there are constraints for the model, which need to be checked
whilst the editor is running, in a way we need runtime model validation.

Could you tell me a simplistic approach to realize that?

I've tried the MDT-OCLTools from Miguel Garica, and the compiler works
very nice, and compiles the constraints as functions into the model code.
But what's the easiest way to get a connection to the editor (for the
validation)?

I'm thankful for any answer,

regards,

Hannes
Re: model validation [message #54912 is a reply to message #54502] Sun, 04 May 2008 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Hannes,

If the OCLTools compiler suits your needs, then the easiest way to
integrate the constraint into your editor is via the generated
EValidator class. This validator would call into the
OCLTools-generated invariant-constraint methods in your model API.
Your editor, then, can use EMF's Diagnostician API to validate an
object whenever it has changed and rebuild its problem markers (as is
done by the ValidateAction generated for your editor). A more
sophisticated approach would analyze the OCL constraint expressions to
determine, for any particular change, which constraints' values may
have changed and for which objects. The MDT OCL API doesn't provide
anything beyond the abstract syntax tree to assist with this analysis.

For more information about generating and using an EValidator, see the
EMF SDK's Developer Guide in the Eclipse help viewer, or the
documentation on the EMF homepage.

HTH,

Christian

On Monday 04-28-2008 (11:38), Hannes N├╝tzmann wrote:
> Hello,

> The actual project I'm working on has a need for a model-editor, and
> we decided to use the model-generator of emf, because we're working
> with emf anyway.

> Moreover there are constraints for the model, which need to be
> checked whilst the editor is running, in a way we need runtime model
> validation.

> Could you tell me a simplistic approach to realize that?

> I've tried the MDT-OCLTools from Miguel Garica, and the compiler
> works very nice, and compiles the constraints as functions into the
> model code. But what's the easiest way to get a connection to the
> editor (for the validation)?

> I'm thankful for any answer,

> regards,

> Hannes




--

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
Re: model validation [message #58034 is a reply to message #54502] Mon, 09 June 2008 17:34 Go to previous message
Miguel Garcia is currently offline Miguel GarciaFriend
Messages: 77
Registered: July 2009
Member
Hannes,

After providing you with an early version of the OCL to Java compiler (and
answering your
off-list questions), I was wondering whether your master thesis report will
be available
online.

If your company (http://www.carmeq.de) has nothing against it, please
consider making it
available online as has been the case for:

Previous Topic:[Announce] MDT OCL 1.2.0RC3 is available
Next Topic:[Announce] MDT OCL 1.2.0RC4 is available
Goto Forum:
  


Current Time: Mon Dec 22 04:19:53 GMT 2014

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

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