Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Re: Referencing attribute of target class in message of OCL Constraint
Re: Referencing attribute of target class in message of OCL Constraint [message #42967] Tue, 06 November 2007 12:24 Go to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lars,

I'm not sure how the OCL constraints produce messages. Christian will
have good ideas. I've included the OCL newsgroup in the "to" list of
the reply...


Lars Heinemann wrote:
> Hi,
>
> do you know if it is possible to use the value of a String attribute
> of the target object in the error message in an OCL constraint? E.g. I
> would like to include the name of the model object in the failure
> message.
>
> Cheers,
> Lars
Re: Referencing attribute of target class in message of OCL Constraint [message #42999 is a reply to message #42967] Tue, 06 November 2007 14:38 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ed, Lars,

Actually, this isn't an MDT OCL question, but an
org.eclipse.emf.validation.ocl question.

Currently, the OCL constraint provider only supports substituting the {0}
message parameter with the label of the problem object.

It would be nice for clients to be able to define, perhaps via the
name/value parameters supported by the IParameterizedConstraintDescriptor,
OCL expressions that compute the string to substitute into a given {n} slot
in the message.

Sounds like a good contribution with which to get to know how the EMF
Validation Framework component works!

:-)


Ed Merks wrote:

> Lars,
>
> I'm not sure how the OCL constraints produce messages. Christian will
> have good ideas. I've included the OCL newsgroup in the "to" list of
> the reply...
>
>
> Lars Heinemann wrote:
>> Hi,
>>
>> do you know if it is possible to use the value of a String attribute
>> of the target object in the error message in an OCL constraint? E.g. I
>> would like to include the name of the model object in the failure
>> message.
>>
>> Cheers,
>> Lars
Previous Topic:[OCL Tools] downloads?
Next Topic:[Announce] MDT 1.1 development plan
Goto Forum:
  


Current Time: Fri Nov 28 11:22:34 GMT 2014

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

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