Re: Referencing attribute of target class in message of OCL Constraint [message #42967] |
Tue, 06 November 2007 12:24 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02908 seconds