Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Write an audit rule
Write an audit rule [message #151733] Wed, 19 September 2007 16:40 Go to next message
Eclipse UserFriend
Originally posted by: elena.renzi.hotmail.com

Hi all,
In my diagram I have an element(element1) that have to be linked to
another element(element2). The palette allows me to create this element1
alone, but when I validate the model I want to display an error that tells
me to create the link between element1 and element2. The question is: how
can I write this using OCL?

Thanks and regards,

Elena
Re: Write an audit rule [message #151890 is a reply to message #151733] Fri, 21 September 2007 01:21 Go to previous message
Eclipse UserFriend
Elena,

In this case, you might not need to use OCL.
In your ecore, just set the lower bound of the EReference to "1" instead
of "0". As a result, the validation will tell you that the reference is
not set.

Koji


Elena wrote:

> Hi all,
> In my diagram I have an element(element1) that have to be linked to
> another element(element2). The palette allows me to create this element1
> alone, but when I validate the model I want to display an error that tells
> me to create the link between element1 and element2. The question is: how
> can I write this using OCL?

> Thanks and regards,

> Elena
Previous Topic:how do we use EIDAttribute ?
Next Topic:Launching an editor with a parameter
Goto Forum:
  


Current Time: Fri Jul 18 00:40:13 EDT 2025

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

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

Back to the top