[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: New to EMF and OCL

Further thoughts on this question:

If I create a simple EClass called Architecture in Ecore with a property of "hardwareNotes", then when I generate the model, a setHardwareNotes(String name) method is generated. When I use the Interactive OCL Console, I get the following error:

self.setHardwareNotes('hw1')

Cannot find operation (setHardwareNotes(String)) for the type (Architecture)

How can I go about setting this?

Thank you,
Richard

On 8/4/2009 8:13 PM, Richard Catlin wrote:
All,

I am using the EMF Framework Validation Plug-in: "OCL Example". It allows me to write OCL expressions in a text file.

Is it possible to set properties in the model based on OCL expressions? The OCL 2.0 Spec says that expressions are guaranteed to be without side effects, but then goes on to say that OCL expressio can be used to specify a state change (eg. in a post-condition).

Pardon me if this is an obvious question.  I am new to EMF and OCL.

Thank you,
Richard Catlin